[gtk+] Adwaita: header bar buttons padding fix



commit 81b22883fd4db3202d7d01016fdeb2699cfaa6da
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Mon Jul 21 15:24:08 2014 +0200

    Adwaita: header bar buttons padding fix

 gtk/resources/theme/Adwaita/_common.scss           |   17 ++++++++++-------
 gtk/resources/theme/Adwaita/gtk-contained-dark.css |   20 ++++++++++++--------
 gtk/resources/theme/Adwaita/gtk-contained.css      |   20 ++++++++++++--------
 3 files changed, 34 insertions(+), 23 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index f853635..96af7d0 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -356,6 +356,14 @@ GtkLabel {
       }
     }
   }
+  // buttons in header bars and action bars
+  .header-bar &.button,
+  .action-bar &.button,
+  .header-bar &.text-button,
+  .action-bar &.text-button { padding: 6px 16px 5px; } // due to font metrics
+  .header-bar &.image-button,
+  .action-bar &.image-button { padding: 8px; }
+
 
   // stack switcher buttons
   .action-bar .stack-switcher &.image-button,
@@ -399,12 +407,6 @@ GtkLabel {
     }
   }
 
-  // buttons in header bars and action bars
-  .header-bar &.image-button,
-  .action-bar &.image-button { padding: 8px; }
-  .header-bar &.text-button,
-  .action-bar &.text-button { padding: 6px 16px 5px; } // due to font metrics
-
   //inline-toolbar buttons
   .inline-toolbar &, .inline-toolbar &:backdrop {
     border-radius: 2px;
@@ -2491,7 +2493,8 @@ GtkVolumeButton.button { padding: 8px; }
 }
 
 // Window Close button
-.button.titlebutton {
+.header-bar .button.titlebutton,
+.titlebar .button.titlebutton {
   padding: 8px;
   border-color: transparent;
   background-image: none;
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css 
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index 00ded81..9943920 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -480,6 +480,10 @@
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
+  .header-bar .button.button, .action-bar .button.button, .header-bar .button.text-button, .action-bar 
.button.text-button {
+    padding: 6px 16px 5px; }
+  .header-bar .button.image-button, .action-bar .button.image-button {
+    padding: 8px; }
   .action-bar .stack-switcher .button.image-button, .header-bar .stack-switcher .button.image-button {
     padding: 5px 2px; }
   .action-bar .stack-switcher .button.text-button, .header-bar .stack-switcher .button.text-button {
@@ -501,10 +505,6 @@
       background-position: right 2px, right 3px; }
       .stack-switcher > .button.needs-attention > GtkLabel:backdrop, .stack-switcher > 
.button.needs-attention > GtkImage:backdrop {
         background-size: 6px 6px, 0 0; }
-  .header-bar .button.image-button, .action-bar .button.image-button {
-    padding: 8px; }
-  .header-bar .button.text-button, .action-bar .button.text-button {
-    padding: 6px 16px 5px; }
   .inline-toolbar .button, .inline-toolbar .button:backdrop {
     border-radius: 2px;
     border-width: 1px; }
@@ -2980,13 +2980,15 @@ GtkVolumeButton.button {
     border-radius: 7px;
     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(28, 31, 31, 0.8); }
 
-.button.titlebutton {
+.header-bar .button.titlebutton,
+.titlebar .button.titlebutton {
   padding: 8px;
   border-color: transparent;
   background-image: none;
   transition-property: border, box-shadow, color;
   box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0); }
-  .button.titlebutton:hover {
+  .header-bar .button.titlebutton:hover,
+  .titlebar .button.titlebutton:hover {
     border-style: solid;
     border-width: 1px;
     color: #eeeeec;
@@ -2995,7 +2997,8 @@ GtkVolumeButton.button {
     text-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
     icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
     box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
-  .button.titlebutton:active {
+  .header-bar .button.titlebutton:active,
+  .titlebar .button.titlebutton:active {
     border-style: solid;
     color: #eeeeec;
     border-color: #1c1f1f;
@@ -3003,7 +3006,8 @@ GtkVolumeButton.button {
     text-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
     icon-shadow: 0 -1px rgba(0, 0, 0, 0.89176);
     box-shadow: inset 0 2px 1px -2px rgba(0, 0, 0, 0.6), 0 1px rgba(238, 238, 236, 0.1); }
-  .button.titlebutton:backdrop {
+  .header-bar .button.titlebutton:backdrop,
+  .titlebar .button.titlebutton:backdrop {
     border-style: solid;
     color: #c9cbc9;
     border-color: #1e2222;
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index d0fae54..a40547d 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -472,6 +472,10 @@
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
+  .header-bar .button.button, .action-bar .button.button, .header-bar .button.text-button, .action-bar 
.button.text-button {
+    padding: 6px 16px 5px; }
+  .header-bar .button.image-button, .action-bar .button.image-button {
+    padding: 8px; }
   .action-bar .stack-switcher .button.image-button, .header-bar .stack-switcher .button.image-button {
     padding: 5px 2px; }
   .action-bar .stack-switcher .button.text-button, .header-bar .stack-switcher .button.text-button {
@@ -493,10 +497,6 @@
       background-position: right 2px, right 3px; }
       .stack-switcher > .button.needs-attention > GtkLabel:backdrop, .stack-switcher > 
.button.needs-attention > GtkImage:backdrop {
         background-size: 6px 6px, 0 0; }
-  .header-bar .button.image-button, .action-bar .button.image-button {
-    padding: 8px; }
-  .header-bar .button.text-button, .action-bar .button.text-button {
-    padding: 6px 16px 5px; }
   .inline-toolbar .button, .inline-toolbar .button:backdrop {
     border-radius: 2px;
     border-width: 1px; }
@@ -2975,13 +2975,15 @@ GtkVolumeButton.button {
     border-radius: 7px;
     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13); }
 
-.button.titlebutton {
+.header-bar .button.titlebutton,
+.titlebar .button.titlebutton {
   padding: 8px;
   border-color: transparent;
   background-image: none;
   transition-property: border, box-shadow, color;
   box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
-  .button.titlebutton:hover {
+  .header-bar .button.titlebutton:hover,
+  .titlebar .button.titlebutton:hover {
     border-style: solid;
     border-width: 1px;
     color: #2e3436;
@@ -2990,7 +2992,8 @@ GtkVolumeButton.button {
     text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
     icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
     box-shadow: inset 0 1px white, 0 1px white; }
-  .button.titlebutton:active {
+  .header-bar .button.titlebutton:active,
+  .titlebar .button.titlebutton:active {
     border-style: solid;
     color: #2e3436;
     border-color: #a1a1a1;
@@ -2998,7 +3001,8 @@ GtkVolumeButton.button {
     text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
     icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
     box-shadow: inset 0 2px 1px -2px rgba(0, 0, 0, 0.6), 0 1px white; }
-  .button.titlebutton:backdrop {
+  .header-bar .button.titlebutton:backdrop,
+  .titlebar .button.titlebutton:backdrop {
     border-style: solid;
     color: #54595a;
     border-color: #a8a8a8;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]