Fix slider with minimum value (#3807)

This commit is contained in:
David Kosorin 2023-08-13 01:59:15 +02:00 committed by GitHub
parent 0e5fc4575a
commit ed71b17f1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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)