mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #69 from chrox/master
bugfix: use ceil to keep index greater than or equal to 1
This commit is contained in:
@@ -31,7 +31,7 @@ end
|
||||
function ReaderFrontLight:onAdjust(arg, ges)
|
||||
if self.lipc_handle then
|
||||
local rel_proportion = ges.distance / Screen:getWidth()
|
||||
local delta_int = self.steps[math.floor(#self.steps*rel_proportion)]
|
||||
local delta_int = self.steps[math.ceil(#self.steps*rel_proportion)]
|
||||
local msg = ""
|
||||
if ges.direction == "north" then
|
||||
msg = _("Increase front light intensity to ")
|
||||
|
||||
Reference in New Issue
Block a user