From 783103b4886743008bed33fdf685bbfb628a950f Mon Sep 17 00:00:00 2001 From: yparitcher Date: Wed, 15 Jul 2020 20:31:40 -0400 Subject: [PATCH] Perception expander: disable margin increase when set to 0 (#6377) Closes #6376 --- plugins/perceptionexpander.koplugin/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/perceptionexpander.koplugin/main.lua b/plugins/perceptionexpander.koplugin/main.lua index 4b9e009dc..a0d4cf110 100644 --- a/plugins/perceptionexpander.koplugin/main.lua +++ b/plugins/perceptionexpander.koplugin/main.lua @@ -128,7 +128,7 @@ function PerceptionExpander:showSettingsDialog() { text = "", input_type = "number", - hint = T(_("Increase margin after pages. Current value: %1"), + hint = T(_("Increase margin after pages. Current value: %1\nSet to 0 to disable."), self.shift_each_pages), }, }, @@ -203,7 +203,7 @@ function PerceptionExpander:onPageUpdate(pageno) self:createUI() end - if self.page_counter >= self.shift_each_pages and self.margin < self.ALMOST_CENTER_OF_THE_SCREEN then + if self.shift_each_pages ~= 0 and self.page_counter >= self.shift_each_pages and self.margin < self.ALMOST_CENTER_OF_THE_SCREEN then self.page_counter = 0 self.margin = self.margin + self.margin_shift self.left_line.dimen.x = self.screen_width * self.margin