From c6c342750753efc77d0221db7f0465643f96882a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 14 Nov 2017 22:29:31 -0500 Subject: iconhelper: Query size via CSS Instead of looking at the icon size, look at the CSS value for -gtk-icon-size. Set style classes depending on icon size instead. Trivially change Adwaita and HighContrast to report the same values as before. --- gtk/theme/Adwaita/_common.scss | 8 ++++++++ gtk/theme/HighContrast/_common.scss | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'gtk/theme') diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 05037eb227..599631f6c5 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -47,6 +47,14 @@ row:focus(visible) { } } +.normal-icons { + -gtk-icon-size: 16px; +} + +.large-icons { + -gtk-icon-size: 32px; +} + /* These wildcard seems unavoidable, need to investigate. Wildcards are bad and troublesome, use them with care, diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss index c172362ce6..e71b9261cf 100644 --- a/gtk/theme/HighContrast/_common.scss +++ b/gtk/theme/HighContrast/_common.scss @@ -88,6 +88,14 @@ $ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94); } } +.normal-icons { + -gtk-icon-size: 16px; +} + +.large-icons { + -gtk-icon-size: 32px; +} + .view { color: $fg_color; background-color: $base_color; -- cgit v1.2.1