After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 582752 - Allow discrete values in the scales
Allow discrete values in the scales
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkRange
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 581915
 
 
Reported: 2009-05-15 11:04 UTC by Bastien Nocera
Modified: 2016-01-30 05:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2009-05-15 11:04:58 UTC
This would require changes to GtkRange and GtkScale.

I think this could be achieved by:
- having a "discrete-values" property in GtkRange, which would change the snap calculation in update_slider_position()
- adding accessors and setters in GtkScale to set the values, without drawing the marks.

Do we want to either:
- always show marks when discrete values are used
- have the discrete stop positions be independent of the marks (separate API?)

Something similar can be achieved by having the bounds set to 0/num_stops and set_digits to 0.
Comment 1 Matthias Clasen 2015-06-21 03:52:49 UTC
Isn't the bottom horizontal scale in gtk3-widget-factory showing exactly what you want ? Thats done by setting round-digits to 0