mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
cre landscape view: adds 1 page / 2 pages toggable
Adds a toggle switch in the Orientation bottom config menu to allow showing 1 page or 2 pages when in landscape mode. Previously, this was hardcoded to be in 2-pages modes only in some circumstances (device resolution + user dpi).
This commit is contained in:
@@ -190,11 +190,12 @@ end
|
||||
function CreDocument:render()
|
||||
-- load document before rendering
|
||||
self:loadDocument()
|
||||
-- set visible page count in landscape
|
||||
if math.max(CanvasContext:getWidth(), CanvasContext:getHeight()) / CanvasContext:getDPI()
|
||||
< DCREREADER_TWO_PAGE_THRESHOLD then
|
||||
self:setVisiblePageCount(1)
|
||||
end
|
||||
-- This is now configurable and done by ReaderRolling:
|
||||
-- -- set visible page count in landscape
|
||||
-- if math.max(CanvasContext:getWidth(), CanvasContext:getHeight()) / CanvasContext:getDPI()
|
||||
-- < DCREREADER_TWO_PAGE_THRESHOLD then
|
||||
-- self:setVisiblePageCount(1)
|
||||
-- end
|
||||
logger.dbg("CreDocument: rendering document...")
|
||||
self._document:renderDocument()
|
||||
self.info.doc_height = self._document:getFullHeight()
|
||||
|
||||
Reference in New Issue
Block a user