[gtk+] Adwaita: fix combos and buttons padding issues.



commit d96bdc357c3a4d0afac2213e4877255e9b26ef6d
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Mon Jul 7 11:45:13 2014 +0200

    Adwaita: fix combos and buttons padding issues.
    
    For some strage reason (bug?) combobox buttons needs -2px vertical padding
    wrt buttons to have the same size as buttons.

 gtk/resources/theme/Adwaita/_common.scss           |   13 +++++++------
 gtk/resources/theme/Adwaita/gtk-contained-dark.css |    8 +++++---
 gtk/resources/theme/Adwaita/gtk-contained.css      |    8 +++++---
 3 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index 5309a1d..51f5f27 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -319,8 +319,10 @@ GtkLabel {
   }
 
   // buttons in header bars and action bars
-  &.image-button { padding: 8px; }
-  &.text-button { padding: 6px 8px 5px; } // due to font metrics
+  .header-bar &.image-button,
+  .action-bar &.image-button { padding: 8px; }
+  .header-bar &.text-button,
+  .action-bar &.text-button { padding: 6px 8px 5px; } // due to font metrics
 
   //inline-toolbar buttons
   .inline-toolbar &, .inline-toolbar &:backdrop {
@@ -569,10 +571,9 @@ GtkColorButton.button { padding: 4px; } // Uniform padding on the
  * ComboBoxes *
  **************/
 GtkComboBox {
-
-  //FIXME padding issue
-  padding: 0;
-
+  > .button { padding-top: 2px; padding-bottom: 2px; } // Otherwise combos
+                                                       // are bigger then
+                                                       // buttons
   -GtkComboBox-arrow-scaling: 0.5;
   -GtkComboBox-shadow-type: none;
 
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css 
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index 8f46554..fcc6615 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -452,9 +452,9 @@
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
-  .button.image-button {
+  .header-bar .button.image-button, .action-bar .button.image-button {
     padding: 8px; }
-  .button.text-button {
+  .header-bar .button.text-button, .action-bar .button.text-button {
     padding: 6px 8px 5px; }
   .inline-toolbar .button, .inline-toolbar .button:backdrop {
     border-radius: 2px;
@@ -753,12 +753,14 @@ GtkColorButton.button {
  * ComboBoxes *
  **************/
 GtkComboBox {
-  padding: 0;
   -GtkComboBox-arrow-scaling: 0.5;
   -GtkComboBox-shadow-type: none;
   box-shadow: 0 1px rgba(238, 238, 236, 0.1);
   text-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
   icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176); }
+  GtkComboBox > .button {
+    padding-top: 2px;
+    padding-bottom: 2px; }
   GtkComboBox:insensitive {
     color: #939695;
     text-shadow: none;
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index 36e2c04..b686728 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -444,9 +444,9 @@
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
-  .button.image-button {
+  .header-bar .button.image-button, .action-bar .button.image-button {
     padding: 8px; }
-  .button.text-button {
+  .header-bar .button.text-button, .action-bar .button.text-button {
     padding: 6px 8px 5px; }
   .inline-toolbar .button, .inline-toolbar .button:backdrop {
     border-radius: 2px;
@@ -745,12 +745,14 @@ GtkColorButton.button {
  * ComboBoxes *
  **************/
 GtkComboBox {
-  padding: 0;
   -GtkComboBox-arrow-scaling: 0.5;
   -GtkComboBox-shadow-type: none;
   box-shadow: 0 1px white;
   text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
   icon-shadow: 0 1px rgba(255, 255, 255, 0.76923); }
+  GtkComboBox > .button {
+    padding-top: 2px;
+    padding-bottom: 2px; }
   GtkComboBox:insensitive {
     color: #8d9091;
     text-shadow: none;


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