summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Boles <dboles.src@gmail.com>2018-07-03 18:55:31 +0100
committerDaniel Boles <dboles.src@gmail.com>2018-07-03 18:55:31 +0100
commit14620423e840729e9a084678e465c52885cf4737 (patch)
treeba08c655dab1822ea00dc02acac959343953c72f
parent55a1f8ccfd27c50b17cf2b91a7e4710db239c7b8 (diff)
downloadgtk+-14620423e840729e9a084678e465c52885cf4737.tar.gz
themes: Restore default progressbar min sizes
The min size on the oriented axis used to come from style props with default values in the source file, used if the theme did not provide a min size in CSS. When the style props were removed, so was any notion of a minimal size for proressbars' main axis, meaning that now progressbars without expand or any other source of min size were just tiny specks. The right place to do that was always the theme, so in our themes now, fix that by copying the old default values for the style properties; see: https://gitlab.gnome.org/GNOME/gtk/issues/1191#note_259393 https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/gtk/gtkprogressbar.c#L92 The result should be the same in that (A) the min size is now what it is in GTK+ 3 & (B) an app/user can override the theme exactly the same way. Close https://gitlab.gnome.org/GNOME/gtk/issues/1192
-rw-r--r--gtk/theme/Adwaita/_common.scss4
-rw-r--r--gtk/theme/Adwaita/gtk-contained-dark.css4
-rw-r--r--gtk/theme/Adwaita/gtk-contained.css4
-rw-r--r--gtk/theme/HighContrast/_common.scss4
-rw-r--r--gtk/theme/HighContrast/gtk-contained-inverse.css4
-rw-r--r--gtk/theme/HighContrast/gtk-contained.css4
6 files changed, 24 insertions, 0 deletions
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index beac635fcb..f9c6cec55b 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -3320,11 +3320,15 @@ scale {
progressbar {
// sizing
&.horizontal {
+ trough { min-width: 150px; }
+
trough,
progress { min-height: 2px; }
}
&.vertical {
+ trough { min-height: 80px; }
+
trough,
progress { min-width: 2px; }
}
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index b3cb7ea8be..281d317c0c 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -1444,8 +1444,12 @@ scale.color.fine-tune.vertical:dir(rtl) slider { margin-right: -15px; margin-lef
/***************** Progress bars * */
progressbar { font-size: smaller; color: rgba(238, 238, 236, 0.4); }
+progressbar.horizontal trough { min-width: 150px; }
+
progressbar.horizontal trough, progressbar.horizontal progress { min-height: 2px; }
+progressbar.vertical trough { min-height: 80px; }
+
progressbar.vertical trough, progressbar.vertical progress { min-width: 2px; }
progressbar.horizontal progress { margin: 0 -1px; }
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index f8ce8af8fb..f562db8947 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -1464,8 +1464,12 @@ scale.color.fine-tune.vertical:dir(rtl) slider { margin-right: -15px; margin-lef
/***************** Progress bars * */
progressbar { font-size: smaller; color: rgba(46, 52, 54, 0.4); }
+progressbar.horizontal trough { min-width: 150px; }
+
progressbar.horizontal trough, progressbar.horizontal progress { min-height: 2px; }
+progressbar.vertical trough { min-height: 80px; }
+
progressbar.vertical trough, progressbar.vertical progress { min-width: 2px; }
progressbar.horizontal progress { margin: 0 -1px; }
diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss
index 4150fd82a0..dba4775e5d 100644
--- a/gtk/theme/HighContrast/_common.scss
+++ b/gtk/theme/HighContrast/_common.scss
@@ -2499,11 +2499,15 @@ progressbar {
// moving bit
&.horizontal {
+ trough { min-width: 150px; }
trough, progress { min-height: 2px; }
}
+
&.vertical {
+ trough { min-height: 80px; }
trough, progress { min-width: 2px; }
}
+
& progress {
border-width: 1px;
border-style: solid;
diff --git a/gtk/theme/HighContrast/gtk-contained-inverse.css b/gtk/theme/HighContrast/gtk-contained-inverse.css
index 1ac9d8db13..8d5e0ee435 100644
--- a/gtk/theme/HighContrast/gtk-contained-inverse.css
+++ b/gtk/theme/HighContrast/gtk-contained-inverse.css
@@ -1105,8 +1105,12 @@ progressbar trough:backdrop { border-color: #737373; background-color: #282828;
progressbar.osd trough { background-color: transparent; box-shadow: none; border-width: 0; }
+progressbar.horizontal trough { min-width: 150px; }
+
progressbar.horizontal trough, progressbar.horizontal progress { min-height: 2px; }
+progressbar.vertical trough { min-height: 80px; }
+
progressbar.vertical trough, progressbar.vertical progress { min-width: 2px; }
progressbar progress { border-width: 1px; border-style: solid; border-radius: 3px; border-color: #aaa; background-color: #ddd; box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2); }
diff --git a/gtk/theme/HighContrast/gtk-contained.css b/gtk/theme/HighContrast/gtk-contained.css
index 1e6e2e6b40..498c11487d 100644
--- a/gtk/theme/HighContrast/gtk-contained.css
+++ b/gtk/theme/HighContrast/gtk-contained.css
@@ -1111,8 +1111,12 @@ progressbar trough:backdrop { border-color: #8d8d8d; background-color: #d7d7d7;
progressbar.osd trough { background-color: transparent; box-shadow: none; border-width: 0; }
+progressbar.horizontal trough { min-width: 150px; }
+
progressbar.horizontal trough, progressbar.horizontal progress { min-height: 2px; }
+progressbar.vertical trough { min-height: 80px; }
+
progressbar.vertical trough, progressbar.vertical progress { min-width: 2px; }
progressbar progress { border-width: 1px; border-style: solid; border-radius: 3px; border-color: #000; background-color: #000; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); }