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 746712 - Range ignores the "inverted" property
Range ignores the "inverted" property
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkRange
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-03-24 22:22 UTC by Marcus Karlsson
Modified: 2015-03-25 03:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot visualizing the bug (6.24 KB, image/png)
2015-03-24 22:22 UTC, Marcus Karlsson
  Details
GtkRange: Check "inverted" property when drawing (3.15 KB, patch)
2015-03-24 22:32 UTC, Marcus Karlsson
committed Details | Review

Description Marcus Karlsson 2015-03-24 22:22:37 UTC
Created attachment 300233 [details]
Screenshot visualizing the bug

The GtkRange widget has a property called inverted which if set to true inverts the direction in which the slider moves. The property is however not checked when the range is drawn, it instead checks only if the direction of the widget is set to be right-to-left.

The attached screenshot shows two GtkScale widgets, each with a range from 1 to 1000 and with the slider's position set to 250. The lower scale has the inverted property set. Notice that both scales are filled from the left side, which gives the impression that the lower scale is set to around 750 instead of 250.
Comment 1 Marcus Karlsson 2015-03-24 22:32:01 UTC
Created attachment 300234 [details] [review]
GtkRange: Check "inverted" property when drawing

This patch makes the gtk_range_draw method call the should_invert function which properly checks if the range should be inverted instead of just checking if the direction has been set to right-to-left.
Comment 2 Matthias Clasen 2015-03-25 03:20:23 UTC
Thanks, seems correct.

Attachment 300234 [details] pushed as 38f61dd - GtkRange: Check "inverted" property when drawing