Page turn animations: add to dispatcher (#9123)

xref: https://www.mobileread.com/forums/showthread.php?p=4224443&postcount=1119
reviewable/pr9126/r1
yparitcher 2 years ago committed by GitHub
parent cb95dcd4c9
commit a97dbb05ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -897,6 +897,10 @@ function ReaderView:onPageChangeAnimation(forward)
end
end
function ReaderView:onTogglePageChangeAnimation()
G_reader_settings:flipNilOrFalse("swipe_animations")
end
function ReaderView:onReaderFooterVisibilityChange()
-- Don't bother ReaderRolling with this nonsense, the footer's height is NOT handled via visible_area there ;)
if self.ui.paging and self.state.page then

@ -129,6 +129,7 @@ local settingsList = {
book_cover = {category="none", event="ShowBookCover", title=_("Book cover"), reader=true, separator=true},
show_config_menu = {category="none", event="ShowConfigMenu", title=_("Show bottom menu"), reader=true},
toggle_bookmark = {category="none", event="ToggleBookmark", title=_("Toggle bookmark"), reader=true},
toggle_page_change_Animation = {category="none", event="TogglePageChangeAnimation", title=_("Toggle page turn animations"), reader=true, condition=Device:canDoSwipeAnimation()},
toggle_inverse_reading_order = {category="none", event="ToggleReadingOrder", title=_("Toggle page turn direction"), reader=true, separator=true},
cycle_highlight_action = {category="none", event="CycleHighlightAction", title=_("Cycle highlight action"), reader=true},
cycle_highlight_style = {category="none", event="CycleHighlightStyle", title=_("Cycle highlight style"), reader=true},

@ -148,7 +148,7 @@ if Device:canDoSwipeAnimation() then
return G_reader_settings:isTrue("swipe_animations")
end,
callback = function()
G_reader_settings:flipNilOrFalse("swipe_animations")
UIManager:broadcastEvent(Event:new("TogglePageChangeAnimation"))
end,
separator = true,
})

Loading…
Cancel
Save