From fe6cd7f2a56d19b43269d8734f67d1ba315f488a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 22 Jun 2014 14:12:29 -0400 Subject: [PATCH] Adwaita: Use rtl variants of pan-end when needed The -gtk-icontheme() function not have any automatism for symbolic or rtl variants built-in, instead, we expect the theme to use selectors to provide the right icon for each situation. --- gtk/resources/theme/Adwaita/_common.scss | 2 ++ gtk/resources/theme/Adwaita/gtk-contained-dark.css | 4 ++++ gtk/resources/theme/Adwaita/gtk-contained.css | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss index 3d619a90f0..573208fdb0 100644 --- a/gtk/resources/theme/Adwaita/_common.scss +++ b/gtk/resources/theme/Adwaita/_common.scss @@ -752,6 +752,7 @@ column-header { } //submenu indicators &.arrow { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); } + &.arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); } } } @@ -1627,6 +1628,7 @@ GtkScrolledWindow { GtkExpander { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); + &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); } &:hover { color: lighten($fg_color,30%); } //only lightens the arrow &:active { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); } } diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css b/gtk/resources/theme/Adwaita/gtk-contained-dark.css index 2bf41bd96c..c907edb8dd 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css @@ -933,6 +933,8 @@ column-header .button, column-header .button:hover, column-header .button:active background-color: #2c2c2c; } .menu .menuitem.arrow { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); } + .menu .menuitem.arrow:dir(rtl) { + -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } /*************** * Popovers * @@ -2170,6 +2172,8 @@ GtkScrolledWindow GtkViewport.frame { *************/ GtkExpander { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); } + GtkExpander:dir(rtl) { + -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } GtkExpander:hover { color: white; } GtkExpander:active { diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css index 8e819d672b..073348eabc 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained.css +++ b/gtk/resources/theme/Adwaita/gtk-contained.css @@ -933,6 +933,8 @@ column-header .button, column-header .button:hover, column-header .button:active background-color: #fcfcfc; } .menu .menuitem.arrow { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); } + .menu .menuitem.arrow:dir(rtl) { + -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } /*************** * Popovers * @@ -2168,6 +2170,8 @@ GtkScrolledWindow GtkViewport.frame { *************/ GtkExpander { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); } + GtkExpander:dir(rtl) { + -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); } GtkExpander:hover { color: #748489; } GtkExpander:active {