diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2011-09-08 18:23:01 -0400 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-09-09 11:47:25 -0400 |
commit | 6efac2bee07d6d8819bc87f49374b0a0d9ce4c1c (patch) | |
tree | 5b27ae1627cbf36eec97b860f58d09c62e68b78f | |
parent | db71297f298a28ea38f7cc3e2ba1ca52d2d6f54f (diff) | |
download | gnome-themes-standard-6efac2bee07d6d8819bc87f49374b0a0d9ce4c1c.tar.gz |
combobox-entry: switch radius/borders when in RTL mode
Don't assume the entry is always the first child and the button is
always the last. Instead, use nth-child(first) and nth-child(last) to
decide where the junction should be drawn.
https://bugzilla.gnome.org/show_bug.cgi?id=658507
-rw-r--r-- | themes/Adwaita/gtk-3.0/gtk-widgets-assets.css | 23 | ||||
-rw-r--r-- | themes/Adwaita/gtk-3.0/gtk-widgets.css | 41 |
2 files changed, 60 insertions, 4 deletions
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css b/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css index 72890ce1..7169fe14 100644 --- a/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css +++ b/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css @@ -93,17 +93,36 @@ } .primary-toolbar GtkComboBox.combobox-entry .button, -GtkComboBox.combobox-entry .button { +GtkComboBox.combobox-entry .button, +.primary-toolbar GtkComboBox.combobox-entry .button:nth-child(last), +GtkComboBox.combobox-entry .button:nth-child(last) { border-image: url("assets/entry-border-normal.svg") 2 / 2 2 2 0 stretch; } .primary-toolbar GtkComboBox.combobox-entry .button:active, .primary-toolbar GtkComboBox.combobox-entry .button:hover:active, GtkComboBox.combobox-entry .button:active, -GtkComboBox.combobox-entry .button:hover:active { +GtkComboBox.combobox-entry .button:hover:active, +.primary-toolbar GtkComboBox.combobox-entry .button:active:nth-child(last), +.primary-toolbar GtkComboBox.combobox-entry .button:hover:active:nth-child(last), +GtkComboBox.combobox-entry .button:active:nth-child(last), +GtkComboBox.combobox-entry .button:hover:active:nth-child(last) { border-image: url("assets/combobox-entry-border-active.svg") 2 / 2 2 2 0 stretch; } +/* for RTL languages */ +.primary-toolbar GtkComboBox.combobox-entry .button:nth-child(first), +GtkComboBox.combobox-entry .button:nth-child(first) { + border-image: url("assets/entry-border-normal.svg") 2 / 2 0 2 2 stretch; +} + +.primary-toolbar GtkComboBox.combobox-entry .button:active:nth-child(first), +.primary-toolbar GtkComboBox.combobox-entry .button:hover:active:nth-child(first), +GtkComboBox.combobox-entry .button:active:nth-child(first), +GtkComboBox.combobox-entry .button:hover:active:nth-child(first) { + border-image: url("assets/combobox-entry-border-active.svg") 2 / 2 0 2 2 stretch; +} + GtkScale.trough, GtkSwitch.trough, GtkScale.trough.horizontal { diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css index 953f2513..cc0f7183 100644 --- a/themes/Adwaita/gtk-3.0/gtk-widgets.css +++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css @@ -523,12 +523,20 @@ GtkComboBox .separator { -GtkWidget-vertical-separator: 0; } -GtkComboBox .entry { +GtkComboBox .entry, +GtkComboBox .entry:nth-child(first) { border-width: 1 0 1 1; border-radius: 3 0 0 3; border-image-width: 2 0 2 2; } +/* for RTL languages */ +GtkComboBox .entry:nth-child(last) { + border-width: 1 1 1 0; + border-radius: 0 3 3 0; + border-image-width: 2 2 2 0; +} + GtkComboBox .button { color: @internal_element_color; padding: 2 3 2 6; @@ -539,6 +547,24 @@ GtkComboBox .button *:prelight { } .primary-toolbar GtkComboBox.combobox-entry .button, +GtkComboBox.combobox-entry .button, +.primary-toolbar GtkComboBox.combobox-entry .button:nth-child(last), +GtkComboBox.combobox-entry .button:nth-child(last) { + border-width: 1 1 1 0; + border-radius: 0 3 3 0; + + padding: 2 3; + -adwaita-focus-fill-color: alpha (@theme_base_color, 0.0); +} + +/* for RTL languages */ +.primary-toolbar GtkComboBox.combobox-entry .button:nth-child(first), +GtkComboBox.combobox-entry .button:nth-child(first) { + border-width: 1 0 1 1; + border-radius: 3 0 0 3; +} + +.primary-toolbar GtkComboBox.combobox-entry .button, GtkComboBox.combobox-entry .button { border-width: 1 1 1 0; border-radius: 0 3 3 0; @@ -557,7 +583,11 @@ GtkComboBox.combobox-entry .button *:prelight { .primary-toolbar GtkComboBox.combobox-entry .button:active, .primary-toolbar GtkComboBox.combobox-entry .button:hover:active, GtkComboBox.combobox-entry .button:active, -GtkComboBox.combobox-entry .button:hover:active { +GtkComboBox.combobox-entry .button:hover:active, +.primary-toolbar GtkComboBox.combobox-entry .button:active:nth-child(last), +.primary-toolbar GtkComboBox.combobox-entry .button:hover:active:nth-child(last), +GtkComboBox.combobox-entry .button:active:nth-child(last), +GtkComboBox.combobox-entry .button:hover:active:nth-child(last) { background-image: -gtk-gradient(linear, left top, left bottom, from(shade(@entry_background_a, 0.95)), @@ -568,6 +598,13 @@ GtkComboBox.combobox-entry .button:hover:active { box-shadow: 1 0 inset shade(@frame_color, 1.50); } +.primary-toolbar GtkComboBox.combobox-entry .button:active:nth-child(first), +.primary-toolbar GtkComboBox.combobox-entry .button:hover:active:nth-child(first), +GtkComboBox.combobox-entry .button:active:nth-child(first), +GtkComboBox.combobox-entry .button:hover:active:nth-child(first) { + box-shadow: -1 0 inset shade(@frame_color, 1.50); +} + /************** * Scrollbars * **************/ |