Commit 791ca28f authored by Janet Blackquill's avatar Janet Blackquill 🌈
Browse files

gtk3, gtk4: refactor arrow icon names into variables

Changing them in one place is much better than having to find/replace
using a fancy editor or recursive sed.
parent ae000574
......@@ -144,6 +144,11 @@ $error_color: $ViewForegroundNegative;
$success_color: $ViewForegroundPositive;
$destructive_color: $error_color;
$arrow_down: 'go-down-symbolic';
$arrow_left: 'go-previous-symbolic';
$arrow_right: 'go-next-symbolic';
$arrow_up: 'go-up-symbolic';
$trough_color: gtkmix(gtk("@theme_bg_color"), gtk("@theme_fg_color"), 0.7);
$trough_color_backdrop: gtkmix(
gtk("@theme_unfocused_bg_color"),
......
......@@ -444,7 +444,7 @@ button {
**************/
combobox {
arrow {
-gtk-icon-source: -gtk-icontheme('go-down-symbolic');
-gtk-icon-source: -gtk-icontheme($arrow_down);
min-height: 16px;
min-width: 16px;
}
......
......@@ -161,7 +161,7 @@ headerbar {
}
.arrow {
-gtk-icon-source: -gtk-icontheme("go-down-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_down);
-gtk-icon-shadow: none;
}
}
......
......@@ -111,7 +111,7 @@ menu,
min-width: 16px;
&:dir(ltr) {
-gtk-icon-source: -gtk-icontheme("go-next-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_right);
margin-left: 10px;
}
......@@ -135,13 +135,13 @@ menu,
&.top {
margin-top: -6px;
border: none;
-gtk-icon-source: -gtk-icontheme("go-up-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_up);
}
&.bottom {
margin-bottom: -6px;
border: none;
-gtk-icon-source: -gtk-icontheme("go-down-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_down);
}
&:hover {
......@@ -264,11 +264,11 @@ modelbutton.flat arrow {
}
&.left {
-gtk-icon-source: -gtk-icontheme("go-previous-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_left);
}
&.right {
-gtk-icon-source: -gtk-icontheme("go-next-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_right);
}
}
......
......@@ -84,7 +84,7 @@ expander {
arrow {
min-width: 16px;
min-height: 16px;
-gtk-icon-source: -gtk-icontheme("go-next-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_right);
&:dir(rtl) {
-gtk-icon-source: -gtk-icontheme("go-next-rtl-symbolic");
}
......@@ -92,7 +92,7 @@ expander {
color: gtkshade(gtk("@theme_fg_color"), 1.3);
} //only lightens the arrow
&:checked {
-gtk-icon-source: -gtk-icontheme("go-down-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_down);
}
}
}
......
......@@ -153,11 +153,11 @@ notebook {
padding-right: 4px;
&.down {
-gtk-icon-source: -gtk-icontheme("go-previous-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_left);
}
&.up {
-gtk-icon-source: -gtk-icontheme("go-next-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_right);
}
}
......@@ -180,11 +180,11 @@ notebook {
padding-bottom: 4px;
&.down {
-gtk-icon-source: -gtk-icontheme("go-up-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_up);
}
&.up {
-gtk-icon-source: -gtk-icontheme("go-down-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_down);
}
}
......
......@@ -112,7 +112,7 @@ treeview.view {
// GtkTreeView uses the larger of the expander’s min-width and min-height
min-width: 16px;
min-height: 16px;
-gtk-icon-source: -gtk-icontheme("go-next-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_right);
color: gtk("@theme_fg_color");
&:dir(rtl) {
-gtk-icon-source: -gtk-icontheme("go-next-rtl-symbolic");
......@@ -124,7 +124,7 @@ treeview.view {
color: gtk("@theme_selected_fg_color");
}
&:checked {
-gtk-icon-source: -gtk-icontheme("go-down-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_down);
&:selected {
color: gtk("@theme_selected_fg_color");
}
......
......@@ -406,7 +406,7 @@ button {
**************/
combobox {
arrow {
-gtk-icon-source: -gtk-icontheme('go-down-symbolic');
-gtk-icon-source: -gtk-icontheme($arrow_down);
min-height: 16px;
min-width: 16px;
}
......
......@@ -143,7 +143,7 @@ headerbar {
padding: 4px 6px;
.arrow {
-gtk-icon-source: -gtk-icontheme('go-down-symbolic');
-gtk-icon-source: -gtk-icontheme($arrow_down);
-gtk-icon-shadow: none;
}
}
......
......@@ -115,7 +115,7 @@ menu,
min-width: 16px;
&:dir(ltr) {
-gtk-icon-source: -gtk-icontheme("go-next-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_right);
margin-left: 10px;
}
......@@ -139,13 +139,13 @@ menu,
&.top {
margin-top: -6px;
border: none;
-gtk-icon-source: -gtk-icontheme("go-up-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_up);
}
&.bottom {
margin-bottom: -6px;
border: none;
-gtk-icon-source: -gtk-icontheme("go-down-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_down);
}
&:hover {
......@@ -270,11 +270,11 @@ modelbutton.flat arrow {
}
&.left {
-gtk-icon-source: -gtk-icontheme("go-previous-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_left);
}
&.right {
-gtk-icon-source: -gtk-icontheme("go-next-symbolic");
-gtk-icon-source: -gtk-icontheme($arrow_right);
}
}
......
......@@ -74,10 +74,10 @@ expander {
arrow {
min-width: 16px;
min-height: 16px;
-gtk-icon-source: -gtk-icontheme('go-next-symbolic');
-gtk-icon-source: -gtk-icontheme($arrow_right);
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('go-next-rtl-symbolic');}
&:hover { color: gtkshade(gtk("@theme_fg_color"),1.3); } //only lightens the arrow
&:checked { -gtk-icon-source: -gtk-icontheme('go-down-symbolic'); }
&:checked { -gtk-icon-source: -gtk-icontheme($arrow_down); }
}
}
......
......@@ -135,9 +135,9 @@
padding-left: 4px;
padding-right: 4px;
&.down { -gtk-icon-source: -gtk-icontheme('go-previous-symbolic'); }
&.down { -gtk-icon-source: -gtk-icontheme($arrow_left); }
&.up { -gtk-icon-source: -gtk-icontheme('go-next-symbolic'); }
&.up { -gtk-icon-source: -gtk-icontheme($arrow_right); }
}
&.left > tabs > arrow {
......@@ -158,9 +158,9 @@
padding-top: 4px;
padding-bottom: 4px;
&.down { -gtk-icon-source: -gtk-icontheme('go-up-symbolic'); }
&.down { -gtk-icon-source: -gtk-icontheme($arrow_up); }
&.up { -gtk-icon-source: -gtk-icontheme('go-down-symbolic'); }
&.up { -gtk-icon-source: -gtk-icontheme($arrow_down); }
}
> tabs > arrow {
......
......@@ -96,13 +96,13 @@ treeview.view {
// GtkTreeView uses the larger of the expander’s min-width and min-height
min-width: 16px;
min-height: 16px;
-gtk-icon-source: -gtk-icontheme('go-next-symbolic');
-gtk-icon-source: -gtk-icontheme($arrow_right);
color: gtk("@theme_fg_color");
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('go-next-rtl-symbolic'); };
&:hover { color: gtk("@theme_button_decoration_hover"); }
&:selected { color: gtk("@theme_selected_fg_color"); }
&:checked {
-gtk-icon-source: -gtk-icontheme('go-down-symbolic');
-gtk-icon-source: -gtk-icontheme($arrow_down);
&:selected { color: gtk("@theme_selected_fg_color"); }
&:backdrop { color: gtk("@theme_unfocused_base_color"); }
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment