From 096b3176dc66842509f6186b764e934490b7a4fe Mon Sep 17 00:00:00 2001 From: John Beard Date: Fri, 11 Dec 2020 18:28:55 +0000 Subject: [PATCH] Add columns to ReaderZooming paged_modes (#6970) This means it will warn when changing to continuous mode while zoom to columns is active. --- frontend/apps/reader/modules/readerview.lua | 7 ++++--- frontend/apps/reader/modules/readerzooming.lua | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/apps/reader/modules/readerview.lua b/frontend/apps/reader/modules/readerview.lua index 59b42df5e..4ca081c9b 100644 --- a/frontend/apps/reader/modules/readerview.lua +++ b/frontend/apps/reader/modules/readerview.lua @@ -730,12 +730,13 @@ function ReaderView:onSetFullScreen(full_screen) end function ReaderView:onSetScrollMode(page_scroll) - if self.ui.document.info.has_pages and page_scroll and self.ui.zooming.paged_modes[self.zoom_mode] then + if self.ui.document.info.has_pages and page_scroll + and self.ui.zooming.paged_modes[self.zoom_mode] then UIManager:show(InfoMessage:new{ text = _([[ -Continuous view (scroll mode) works best with zoom to page width or zoom to content width. +Continuous view (scroll mode) works best with zoom to page width, zoom to content width or zoom to rows. -In combination with zoom to fit page, page height, content height or content, continuous view can cause unexpected shifts when turning pages.]]), +In combination with zoom to fit page, page height, content height, content or columns, continuous view can cause unexpected shifts when turning pages.]]), timeout = 5, }) end diff --git a/frontend/apps/reader/modules/readerzooming.lua b/frontend/apps/reader/modules/readerzooming.lua index ef7ca0136..245895bd4 100644 --- a/frontend/apps/reader/modules/readerzooming.lua +++ b/frontend/apps/reader/modules/readerzooming.lua @@ -53,6 +53,7 @@ local ReaderZooming = InputContainer:new{ pageheight = _("Zoom to fit page height works best with page view."), contentheight = _("Zoom to fit content height works best with page view."), content = _("Zoom to fit content works best with page view."), + columns = _("Zoom to fit columns works best with page view."), }, }