[gtk+] Adwaita: add vertically linked combos



commit f2cd7f151e52cd28fbd99d39439d527e341564e5
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Sun Oct 5 00:56:48 2014 +0200

    Adwaita: add vertically linked combos

 gtk/resources/theme/Adwaita/_common.scss           |   19 ++++++++++++--
 gtk/resources/theme/Adwaita/gtk-contained-dark.css |   26 ++++++++++++-------
 gtk/resources/theme/Adwaita/gtk-contained.css      |   26 ++++++++++++-------
 3 files changed, 48 insertions(+), 23 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index 16e3ec6..c5174dc 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -328,7 +328,7 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers
     &:backdrop { color: mix($backdrop_fg_color,$backdrop_base_color,80%); }
   }
 
-  .linked.vertical & {
+  .linked.vertical & { //FIXME comment stuff and make the whole thing smarter.
     @include entry(normal, $edge: none);
     background-image: linear-gradient(to bottom, $base_color);
     border-bottom-color: mix($borders_color, $base_color, 30%);
@@ -754,9 +754,14 @@ $_dot_color: if($variant=='light', $selected_bg_color,
   }
 }
 
-%linked_vertical{
+%linked_vertical_middle {
   border-left-style: solid;
   border-top-style: none;
+  border-radius: 0;
+}
+
+%linked_vertical{
+  @extend %linked_vertical_middle;
   &:first-child {
     border-style: solid;
     border-radius: 3px 3px 0 0;
@@ -879,7 +884,7 @@ GtkColorButton.button {
       &:dir(rtl) { border-style: none solid none none; }
     }
   }
-  &.vertical, &.vertical:dir(rtl) {
+  &.vertical, &.vertical:dir(rtl) { //FIXME: try using linking templates for vertically linked stuff
     .button {
       padding-top: 8px;    //  Same vertical padding as image-buttons
       padding-bottom: 8px; //
@@ -1013,6 +1018,14 @@ GtkComboBox {
 .linked > GtkComboBox:only-child > .button {
   @extend %linked:only-child;
 }
+.linked.vertical > GtkComboBoxText > .button,
+.linked.vertical > GtkComboBox > .button { @extend %linked_vertical_middle; }
+.linked.vertical > GtkComboBoxText:first-child > .button,
+.linked.vertical > GtkComboBox:first-child > .button { @extend %linked_vertical:first-child; }
+.linked.vertical > GtkComboBoxText:last-child > .button,
+.linked.vertical > GtkComboBox:last-child > .button { @extend %linked_vertical:last-child; }
+.linked.vertical > GtkComboBoxText:only-child > .button,
+.linked.vertical > GtkComboBox:only-child > .button { @extend %linked_vertical:only-child; }
 
 /************
  * Toolbars *
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css 
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index 6da46cf..c397239 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -1192,17 +1192,23 @@ GtkCalendar.header .inline-toolbar GtkToolButton:backdrop:only-child > .button.t
   border-radius: 3px;
   border-style: solid; }
 
-.linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, 
.linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical 
.entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical 
.button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop {
+.linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, 
.linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical 
.entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical 
.button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop, .linked.vertical > 
GtkComboBoxText > .button,
+.linked.vertical > GtkComboBox > .button {
   border-left-style: solid;
-  border-top-style: none; }
-  .linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, 
.linked.vertical .button:first-child {
-    border-style: solid;
-    border-radius: 3px 3px 0 0; }
-  .linked.vertical .entry:last-child, .linked.vertical .button:last-child {
-    border-radius: 0 0 3px 3px; }
-  .linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical 
.button:only-child {
-    border-radius: 3px;
-    border-style: solid; }
+  border-top-style: none;
+  border-radius: 0; }
+
+.linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, .linked.vertical 
.button:first-child, .linked.vertical > GtkComboBoxText:first-child > .button,
+.linked.vertical > GtkComboBox:first-child > .button {
+  border-style: solid;
+  border-radius: 3px 3px 0 0; }
+.linked.vertical .entry:last-child, .linked.vertical .button:last-child, .linked.vertical > 
GtkComboBoxText:last-child > .button,
+.linked.vertical > GtkComboBox:last-child > .button {
+  border-radius: 0 0 3px 3px; }
+.linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical 
.button:only-child, .linked.vertical > GtkComboBoxText:only-child > .button,
+.linked.vertical > GtkComboBox:only-child > .button {
+  border-radius: 3px;
+  border-style: solid; }
 
 .menuitem.button.flat, .header-bar .menuitem.titlebutton.button,
 .titlebar .menuitem.titlebutton.button,
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index 7b9c0c4..5c851dd 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -1184,17 +1184,23 @@ GtkCalendar.header .inline-toolbar GtkToolButton:backdrop:only-child > .button.t
   border-radius: 3px;
   border-style: solid; }
 
-.linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, 
.linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical 
.entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical 
.button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop {
+.linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, 
.linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical 
.entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical 
.button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop, .linked.vertical > 
GtkComboBoxText > .button,
+.linked.vertical > GtkComboBox > .button {
   border-left-style: solid;
-  border-top-style: none; }
-  .linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, 
.linked.vertical .button:first-child {
-    border-style: solid;
-    border-radius: 3px 3px 0 0; }
-  .linked.vertical .entry:last-child, .linked.vertical .button:last-child {
-    border-radius: 0 0 3px 3px; }
-  .linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical 
.button:only-child {
-    border-radius: 3px;
-    border-style: solid; }
+  border-top-style: none;
+  border-radius: 0; }
+
+.linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, .linked.vertical 
.button:first-child, .linked.vertical > GtkComboBoxText:first-child > .button,
+.linked.vertical > GtkComboBox:first-child > .button {
+  border-style: solid;
+  border-radius: 3px 3px 0 0; }
+.linked.vertical .entry:last-child, .linked.vertical .button:last-child, .linked.vertical > 
GtkComboBoxText:last-child > .button,
+.linked.vertical > GtkComboBox:last-child > .button {
+  border-radius: 0 0 3px 3px; }
+.linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical 
.button:only-child, .linked.vertical > GtkComboBoxText:only-child > .button,
+.linked.vertical > GtkComboBox:only-child > .button {
+  border-radius: 3px;
+  border-style: solid; }
 
 .menuitem.button.flat, .header-bar .menuitem.titlebutton.button,
 .titlebar .menuitem.titlebutton.button,


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