Tweaked minimal slider magic numbers again so maximum value can be reached (bug #24531)
There seems to possibly be an internal issue with the slider (and more generally, the scrollbar implementation form which it inherits) where is min/maximum_positioner_length equal an even number, sliders with an even number of options will reach max value. Setting it to what, in this case is 1 below the actual width of the slider image (15) means both even and odd-numbered sliders will reach max value, however the edge is cut off. Attempting to set the right_offset to 1 and using the above off value for the positioned width means only sliders with an odd number of options reach max value. The magic numbers in this commit seem to give the widget enough space to reach the end of the slider and max values regardless of the number of options, but the internal widget dimension calculation should perhaps be investigated in the future.
This commit is contained in:
parent
6c98f52b82
commit
9f3639d5bb
1 changed files with 3 additions and 3 deletions
|
@ -15,7 +15,7 @@
|
|||
[line]
|
||||
x1 = 0
|
||||
y1 = "(height / 2)"
|
||||
x2 = "(width - 2)"
|
||||
x2 = "(width - 4)"
|
||||
y2 = "(height / 2)"
|
||||
|
||||
color = {GROOVE_COLOR}
|
||||
|
@ -53,7 +53,7 @@
|
|||
minimum_positioner_length = {POSITIONER_LENGTH}
|
||||
maximum_positioner_length = {POSITIONER_LENGTH}
|
||||
|
||||
right_offset = 2
|
||||
right_offset = 3
|
||||
|
||||
#text_font_size = 1 # placeholder
|
||||
|
||||
|
@ -92,7 +92,7 @@
|
|||
id = "minimal"
|
||||
description = "A slider without a value label."
|
||||
|
||||
{_GUI_RESOLUTION () 150 250 22 15 }
|
||||
{_GUI_RESOLUTION () 150 250 22 16 }
|
||||
|
||||
[/slider_definition]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue