summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLapo Calamandrei <calamandrei@gmail.com>2014-08-06 12:23:47 +0200
committerLapo Calamandrei <calamandrei@gmail.com>2014-08-06 12:23:47 +0200
commitcfff5620692024cb4a9a99e37ba4eac6893e4f41 (patch)
tree2660a622443877c0612b381a0d40c468e60082c8
parent285f1cc30fc03f385d1a48d86ec13f2f450981bd (diff)
downloadgtk+-cfff5620692024cb4a9a99e37ba4eac6893e4f41.tar.gz
Adwaita: linked combos
-rw-r--r--gtk/resources/theme/Adwaita/_common.scss30
-rw-r--r--gtk/resources/theme/Adwaita/gtk-contained-dark.css20
-rw-r--r--gtk/resources/theme/Adwaita/gtk-contained.css20
3 files changed, 70 insertions, 0 deletions
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index 0f3bb9b282..6c2809be50 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 144d3bd6c9..bd468d55cd 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 c3804916ff..e6b91b0eae 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 *
************/