[gtk+] Adwaita: linked combos



commit cfff5620692024cb4a9a99e37ba4eac6893e4f41
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Wed Aug 6 12:23:47 2014 +0200

    Adwaita: linked combos

 gtk/resources/theme/Adwaita/_common.scss           |   30 ++++++++++++++++++++
 gtk/resources/theme/Adwaita/gtk-contained-dark.css |   20 +++++++++++++
 gtk/resources/theme/Adwaita/gtk-contained.css      |   20 +++++++++++++
 3 files changed, 70 insertions(+), 0 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index 0f3bb9b..6c2809b 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -762,6 +762,36 @@ GtkComboBox {
   }
 }
 
+
+//FIXME: we need a better general solution for button linking
+
+.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), &:dir(rtl) { // needed to increase specificity
+    border-radius: 0;
+    border-left-style: none;
+  }
+  &:dir(rtl) {
+    border-right-style: none;
+    border-left-style: solid
+  }
+}
+.linked > GtkComboBox:first-child > .button {
+  border-radius: 3px 0 0 3px;
+  border-left-style: solid;
+}
+.linked > GtkComboBox:last-child > .button {
+  border-radius: 0 3px 3px 0;
+  &:dir(rtl) { border-right-style: solid; }
+}
+.linked > GtkComboBox:only-child > .button {
+  border-radius: 3px;
+  border-style: solid;
+}
+
 /************
  * Toolbars *
  ************/
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css 
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index 144d3bd..bd468d5 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -881,6 +881,26 @@ GtkComboBox {
       border-left-style: solid;
       border-right-style: none; }
 
+.linked > GtkComboBox > .button:dir(ltr), .linked > GtkComboBox > .button:dir(rtl) {
+  border-radius: 0;
+  border-left-style: none; }
+.linked > GtkComboBox > .button:dir(rtl) {
+  border-right-style: none;
+  border-left-style: solid; }
+
+.linked > GtkComboBox:first-child > .button {
+  border-radius: 3px 0 0 3px;
+  border-left-style: solid; }
+
+.linked > GtkComboBox:last-child > .button {
+  border-radius: 0 3px 3px 0; }
+  .linked > GtkComboBox:last-child > .button:dir(rtl) {
+    border-right-style: solid; }
+
+.linked > GtkComboBox:only-child > .button {
+  border-radius: 3px;
+  border-style: solid; }
+
 /************
  * Toolbars *
  ************/
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index c380491..e6b91b0 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -873,6 +873,26 @@ GtkComboBox {
       border-left-style: solid;
       border-right-style: none; }
 
+.linked > GtkComboBox > .button:dir(ltr), .linked > GtkComboBox > .button:dir(rtl) {
+  border-radius: 0;
+  border-left-style: none; }
+.linked > GtkComboBox > .button:dir(rtl) {
+  border-right-style: none;
+  border-left-style: solid; }
+
+.linked > GtkComboBox:first-child > .button {
+  border-radius: 3px 0 0 3px;
+  border-left-style: solid; }
+
+.linked > GtkComboBox:last-child > .button {
+  border-radius: 0 3px 3px 0; }
+  .linked > GtkComboBox:last-child > .button:dir(rtl) {
+    border-right-style: solid; }
+
+.linked > GtkComboBox:only-child > .button {
+  border-radius: 3px;
+  border-style: solid; }
+
 /************
  * Toolbars *
  ************/


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