[gimp] libgimpwidgets, themes: more compact GimpSpinScale.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpwidgets, themes: more compact GimpSpinScale.
- Date: Thu, 17 Feb 2022 22:14:01 +0000 (UTC)
commit 6b5037f0397fa83f7406a47775c6e49d74baa401
Author: Jehan <jehan girinstud io>
Date: Wed Feb 16 19:01:39 2022 +0100
libgimpwidgets, themes: more compact GimpSpinScale.
There were some complaint about the height of these scale.
The min-height was clearly too high. I also made the buttons a bit more
compact by removing a bit of padding.
Finally I add a CSS name to the class, in order to avoid using the
parent class name ("spinbutton"). This makes for clearer and more
customizable themes (ability to style the GimpSpinScale without styling
GtkSpinButton too).
libgimpwidgets/gimpspinscale.c | 2 ++
themes/System/gimp.css | 12 +++++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/libgimpwidgets/gimpspinscale.c b/libgimpwidgets/gimpspinscale.c
index 57143211f8..f296e6fb2b 100644
--- a/libgimpwidgets/gimpspinscale.c
+++ b/libgimpwidgets/gimpspinscale.c
@@ -172,6 +172,8 @@ gimp_spin_scale_class_init (GimpSpinScaleClass *klass)
g_param_spec_string ("label", NULL, NULL,
NULL,
GIMP_PARAM_READWRITE));
+
+ gtk_widget_class_set_css_name (widget_class, "GimpSpinScale");
}
static void
diff --git a/themes/System/gimp.css b/themes/System/gimp.css
index 8bdcba1066..dda6d99ea8 100644
--- a/themes/System/gimp.css
+++ b/themes/System/gimp.css
@@ -117,12 +117,22 @@ GimpRuler {
font-size: smaller;
}
-spinbutton entry progress {
+GimpSpinScale entry {
+ /* Important: prevent overhigh spin scale */
+ min-height: 16px;
+}
+
+GimpSpinScale entry progress {
background-color: @theme_selected_bg_color;
border-width: 0px;
border-radius: 3px;
}
+GimpSpinScale button {
+ /* Makes the +- buttons a bit more compact. */
+ padding: 0 1px 0 1px;
+}
+
entry.italic {
font-style: italic;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]