GNOME Bugzilla – Bug 511470
Enable setting the origin point of the fill level
Last modified: 2018-05-02 14:31:06 UTC
Some themes like clearlooks, clearlooks classic, darkilouche, ... draw a colored bar inside the GtkRange from the left to the slider position. I have a panorama position slider in my music application. The underlying GtkAdjustment goes from -1.0 to 1.0 (left to right). There this color bar looks really odd. Unfortunately the GtkAdjustment has no default/middle value. If the theme wants to draw this, what about this: min,max are positive, start from left min,max are negative, start from right min,max have different signs, start from 0.0 invert everything for RTL languagages, and do simmilar for vertical ranges.
* min,max are positive, start from left The default * min,max are negative, start from right You can set the "inverted" property of GtkRange to achieve this * min,max have different signs, start from 0.0 OK, no way to do this, but it would need to be handled on the GTK+ level somehow. I wonder if there are a lot of cases where this makes sense, or if it would make more sense to just hide the colored bar entirely in some cases.
Agreed, even hiding the color bar would make sense in the third case.
Matthias Clasen was saying in this mail that themes can actually get the adjustments from the widget: http://mail.gnome.org/archives/gtk-devel-list/2009-January/msg00027.html I'll probably try to disable the GtkRange::trough-side-details in my rc file. Not that nice, as it makes things looking inconsistent.
See bug 565144 for an example of how to do the trough-side-details thing programmatically for an individual scale.
(In reply to Benjamin Berg from comment #1) > * min,max are negative, start from right > You can set the "inverted" property of GtkRange to achieve this Won't that also swap the min/max? That just swaps the problem for another, if so. > * min,max have different signs, start from 0.0 > OK, no way to do this, but it would need to be handled on the GTK+ level > somehow. I wonder if there are a lot of cases where this makes sense, or if > it would make more sense to just hide the colored bar entirely in some cases. Yeah, in these cases, I just have to turn off showing the fill level. I would like a way to show it from zero, though, or even a freely configurable value. I opened a similar ticket, which I'll probably close as a dupe soon.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/288.