forked from AuroraMiddleware/gtk
range: Treat lower and upper limit the same
When clamping values to be within the range of the adjustment, treat the lower and upper limit the same. Fixes: #328
This commit is contained in:
parent
3b8bd265a3
commit
e9872d52d8
@ -1746,9 +1746,9 @@ coord_to_value (GtkRange *range,
|
||||
else
|
||||
{
|
||||
if (priv->slider_size_fixed)
|
||||
frac = MAX (0, coord) / (double) (trough_length);
|
||||
frac = CLAMP (coord / (double) trough_length, 0, 1);
|
||||
else
|
||||
frac = MAX (0, coord) / (double) (trough_length - slider_length);
|
||||
frac = CLAMP (coord / (double) (trough_length - slider_length), 0, 1);
|
||||
}
|
||||
|
||||
if (should_invert (range))
|
||||
|
Loading…
Reference in New Issue
Block a user