[gnome-themes-standard] HC: sync linked button fixes with Adwaita



commit 2ab9756ac1c32d487947c377174d900f236f0e68
Author: Jakub Steiner <jimmac gmail com>
Date:   Mon Aug 18 13:26:24 2014 +0200

    HC: sync linked button fixes with Adwaita
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733979

 themes/HighContrast/gtk-3.0/_common.scss |   57 +++++++++++++++++++++++++-----
 themes/HighContrast/gtk-3.0/gtk.css      |   26 +++++++------
 2 files changed, 62 insertions(+), 21 deletions(-)
---
diff --git a/themes/HighContrast/gtk-3.0/_common.scss b/themes/HighContrast/gtk-3.0/_common.scss
index bf34d56..7236203 100644
--- a/themes/HighContrast/gtk-3.0/_common.scss
+++ b/themes/HighContrast/gtk-3.0/_common.scss
@@ -270,22 +270,22 @@ GtkLabel {
     padding: 6px;
     border-width: 1px 1px 2px 1px;
     @include button(osd);
-    @extend %linked_buttons;
+    @extend %linked;
     &:hover {
       @include button(osd-hover);
-      @extend %linked_buttons;
+      @extend %linked;
     }
     &:active, &:checked {
       @include button(osd-active);
-      @extend %linked_buttons;
+      @extend %linked;
     }
     &:insensitive {
       @include button(osd-insensitive);
-      @extend %linked_buttons;
+      @extend %linked;
     }
     &:backdrop {
       @include button(osd-backdrop);
-      @extend %linked_buttons;
+      @extend %linked;
     }
   }
   // Suggested and Destructive Action buttons
@@ -319,7 +319,7 @@ GtkLabel {
   .inline-toolbar &, .inline-toolbar &:backdrop {
     border-radius: 2px;
     border-width: 1px;
-    @extend %linked_buttons;
+    @extend %linked;
   }
 
   .primary-toolbar & { icon-shadow: none; } // tango icons don't need added shadows
@@ -328,7 +328,7 @@ GtkLabel {
 //    -GtkWidget-horizontal-separator: 0;
 //   }
   .linked &, .linked &:backdrop {
-    @extend %linked_buttons;
+    @extend %linked;
   }
 }
 
@@ -371,13 +371,19 @@ GtkLabel {
   }
 }
 
-%linked_buttons {
+
+%linked_middle {
   border-radius: 0;
   border-left-style: none;
   &:dir(rtl) {
+    border-radius: 0; // needed when including %linked_middle:dir(rtl)
     border-right-style: none;
     border-left-style: solid
-  };
+  }
+}
+
+%linked {
+  @extend %linked_middle;
   &:first-child {
     border-radius: 3px 0 0 3px;
     border-left-style: solid;
@@ -392,6 +398,22 @@ GtkLabel {
   }
 }
 
+%linked_vertical{
+  border-left-style: solid;
+  border-top-style: none;
+  &:first-child {
+    border-style: solid;
+    border-radius: 3px 3px 0 0;
+  }
+  &:last-child {
+    border-radius: 0 0 3px 3px;
+  }
+  &:only-child {
+    border-radius: 3px;
+    border-style: solid;
+  }
+}
+
 %undecorated_button {
   border-color: transparent;
   background-color: transparent;
@@ -608,6 +630,23 @@ GtkComboBox {
   }
 }
 
+.linked > GtkComboBox > .button {
+  // the combo is a composite widget so the way we do button linkind doesn't
+  // work, special case needed. See
+  // https://bugzilla.gnome.org/show_bug.cgi?id=733979
+  &:dir(ltr) { @extend %linked_middle; } // specificity bump
+  &:dir(rtl) { @extend %linked_middle:dir(rtl); }
+}
+.linked > GtkComboBox:first-child > .button {
+  @extend %linked:first-child;
+}
+.linked > GtkComboBox:last-child > .button {
+  @extend %linked:last-child;
+}
+.linked > GtkComboBox:only-child > .button {
+  @extend %linked:only-child;
+}
+
 /************
  * Toolbars *
  ************/
diff --git a/themes/HighContrast/gtk-3.0/gtk.css b/themes/HighContrast/gtk-3.0/gtk.css
index e656e50..a8fba46 100644
--- a/themes/HighContrast/gtk-3.0/gtk.css
+++ b/themes/HighContrast/gtk-3.0/gtk.css
@@ -488,22 +488,24 @@
   border-radius: 3px;
   border-style: solid; }
 
-.osd .button, .osd .button:hover, .osd .button:active, .osd .button:checked, .osd .button:insensitive, .osd 
.button:backdrop, .inline-toolbar .button, .inline-toolbar .button:backdrop, .linked .button, .linked 
.button:backdrop {
+.osd .button, .osd .button:hover, .osd .button:active, .osd .button:checked, .osd .button:insensitive, .osd 
.button:backdrop, .inline-toolbar .button, .inline-toolbar .button:backdrop, .linked .button, .linked 
.button:backdrop, .linked > GtkComboBox > .button:dir(ltr) {
   border-radius: 0;
   border-left-style: none; }
-  .osd .button:dir(rtl), .inline-toolbar .button:dir(rtl), .linked .button:dir(rtl) {
+  .osd .button:dir(rtl), .inline-toolbar .button:dir(rtl), .linked .button:dir(rtl), .linked > GtkComboBox > 
.button:dir(rtl) {
+    border-radius: 0;
     border-right-style: none;
     border-left-style: solid; }
-  .osd .button:first-child, .inline-toolbar .button:first-child, .linked .button:first-child {
-    border-radius: 3px 0 0 3px;
-    border-left-style: solid; }
-  .osd .button:last-child, .inline-toolbar .button:last-child, .linked .button:last-child {
-    border-radius: 0 3px 3px 0; }
-    .osd .button:last-child:dir(rtl), .inline-toolbar .button:last-child:dir(rtl), .linked 
.button:last-child:dir(rtl) {
-      border-right-style: solid; }
-  .osd .button:only-child, .inline-toolbar .button:only-child, .linked .button:only-child {
-    border-radius: 3px;
-    border-style: solid; }
+
+.osd .button:first-child, .inline-toolbar .button:first-child, .linked .button:first-child, .linked > 
GtkComboBox:first-child > .button {
+  border-radius: 3px 0 0 3px;
+  border-left-style: solid; }
+.osd .button:last-child, .inline-toolbar .button:last-child, .linked .button:last-child, .linked > 
GtkComboBox:last-child > .button {
+  border-radius: 0 3px 3px 0; }
+  .osd .button:last-child:dir(rtl), .inline-toolbar .button:last-child:dir(rtl), .linked 
.button:last-child:dir(rtl), .linked > GtkComboBox:last-child > .button:dir(rtl) {
+    border-right-style: solid; }
+.osd .button:only-child, .inline-toolbar .button:only-child, .linked .button:only-child, .linked > 
GtkComboBox:only-child > .button {
+  border-radius: 3px;
+  border-style: solid; }
 
 .button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, 
.menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, 
.button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab 
.button, .list-row.button, .list-row.button:backdrop:hover, GtkCalendar.button, GtkCalendar.button:hover, 
GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover {
   border-color: transparent;


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