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:
1 parent
0948a4b656
commit
22bc9dacb5
4 files changed
+84
-7
No files matched your search
@@ -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