mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Page turn animations: add to dispatcher (#9123)
xref: https://www.mobileread.com/forums/showthread.php?p=4224443&postcount=1119
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user