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).
This commit is contained in:
Jehan 2022-02-16 19:01:39 +01:00
parent c93742f178
commit 6b5037f039
2 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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;
}