BD invert: enable for TOC BookMap & PageBrowser

reviewable/pr8831/r1
yparitcher 2 years ago committed by Frans de Jonge
parent 42dd5aadca
commit 60f68023d8

@ -644,6 +644,10 @@ function ReaderToc:expandParentNode(index)
end end
function ReaderToc:onShowToc() function ReaderToc:onShowToc()
if self.view.inverse_reading_order then
BD.invert()
end
self:fillToc() self:fillToc()
-- build menu items -- build menu items
if #self.toc > 0 and not self.toc[1].text then if #self.toc > 0 and not self.toc[1].text then
@ -813,6 +817,7 @@ function ReaderToc:onShowToc()
toc_menu.close_callback = function() toc_menu.close_callback = function()
UIManager:close(menu_container) UIManager:close(menu_container)
BD.resetInvert()
end end
toc_menu.show_parent = menu_container toc_menu.show_parent = menu_container

@ -527,6 +527,10 @@ local BookMapWidget = InputContainer:new{
} }
function BookMapWidget:init() function BookMapWidget:init()
if self.ui.view.inverse_reading_order then
BD.invert()
end
-- Compute non-settings-dependant sizes and options -- Compute non-settings-dependant sizes and options
self.dimen = Geom:new{ self.dimen = Geom:new{
w = Screen:getWidth(), w = Screen:getWidth(),
@ -1042,6 +1046,7 @@ function BookMapWidget:onClose(close_all_parents)
UIManager:setDirty(self.launcher, "ui") UIManager:setDirty(self.launcher, "ui")
end end
else else
BD.resetInvert()
-- Remove all thumbnails generated for a different target size than -- Remove all thumbnails generated for a different target size than
-- the last one used (no need to keep old sizes if the user played -- the last one used (no need to keep old sizes if the user played
-- with nb_cols/nb_rows, as on next opening, we just need the ones -- with nb_cols/nb_rows, as on next opening, we just need the ones

@ -39,6 +39,10 @@ local PageBrowserWidget = InputContainer:new{
} }
function PageBrowserWidget:init() function PageBrowserWidget:init()
if self.ui.view.inverse_reading_order then
BD.invert()
end
-- Compute non-settings-dependant sizes and options -- Compute non-settings-dependant sizes and options
self.dimen = Geom:new{ self.dimen = Geom:new{
w = Screen:getWidth(), w = Screen:getWidth(),
@ -641,6 +645,7 @@ function PageBrowserWidget:onClose(close_all_parents)
UIManager:setDirty(self.launcher, "ui") UIManager:setDirty(self.launcher, "ui")
end end
else else
BD.resetInvert()
-- Remove all thumbnails generated for a different target size than -- Remove all thumbnails generated for a different target size than
-- the last one used (no need to keep old sizes if the user played -- the last one used (no need to keep old sizes if the user played
-- with nb_cols/nb_rows, as on next opening, we just need the ones -- with nb_cols/nb_rows, as on next opening, we just need the ones

Loading…
Cancel
Save