mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Reader: do not apply line spacing out of range (#10307)
* readercoptlistener: fix line spacing out of range * readerkoptlistener: fix line spacing out of range * creoptions: fix line spacing limit
This commit is contained in:
@@ -69,9 +69,9 @@ function ReaderCoptListener:onReadSettings(config)
|
||||
end
|
||||
|
||||
function ReaderCoptListener:onConfigChange(option_name, option_value)
|
||||
-- font_size is historically and sadly shared by both mupdf and cre reader modules,
|
||||
-- font_size and line_spacing are historically and sadly shared by both mupdf and cre reader modules,
|
||||
-- but fortunately they can be distinguished by their different ranges
|
||||
if option_name == "font_size" and option_value < 5 then return end
|
||||
if (option_name == "font_size" or option_name == "line_spacing") and option_value < 5 then return end
|
||||
self.document.configurable[option_name] = option_value
|
||||
self.ui:handleEvent(Event:new("StartActivityIndicator"))
|
||||
return true
|
||||
|
||||
@@ -72,9 +72,9 @@ function ReaderKoptListener:onDocLangUpdate(lang)
|
||||
end
|
||||
|
||||
function ReaderKoptListener:onConfigChange(option_name, option_value)
|
||||
-- font_size is historically and sadly shared by both mupdf and cre reader modules,
|
||||
-- font_size and line_spacing are historically and sadly shared by both mupdf and cre reader modules,
|
||||
-- but fortunately they can be distinguished by their different ranges
|
||||
if option_name == "font_size" and option_value > 5 then return end
|
||||
if (option_name == "font_size" or option_name == "line_spacing") and option_value > 5 then return end
|
||||
self.document.configurable[option_name] = option_value
|
||||
self.ui:handleEvent(Event:new("StartActivityIndicator"))
|
||||
UIManager:setDirty("all", "partial")
|
||||
|
||||
@@ -387,7 +387,7 @@ Note that your selected font size is not affected by this setting.]]),
|
||||
more_options = true,
|
||||
more_options_param = {
|
||||
value_min = 50,
|
||||
value_max = 300,
|
||||
value_max = 200,
|
||||
value_step = 1,
|
||||
value_hold_step = 5,
|
||||
unit = "%",
|
||||
|
||||
Reference in New Issue
Block a user