Fix slider with minimum value (#3807)
This commit is contained in:
parent
0e5fc4575a
commit
ed71b17f1b
|
@ -520,8 +520,8 @@ end
|
|||
|
||||
-- Move the handle to the correct location
|
||||
local function move_handle(self, width, x, _)
|
||||
local _, _, interval = get_extremums(self)
|
||||
self:set_value(math.floor((x*interval)/width))
|
||||
local min, _, interval = get_extremums(self)
|
||||
self:set_value(min+math.floor((x*interval)/width))
|
||||
end
|
||||
|
||||
local function mouse_press(self, x, y, button_id, _, geo)
|
||||
|
|
Loading…
Reference in New Issue