mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
workaround to fix #1340
This commit is contained in:
@@ -81,6 +81,13 @@ function SetDefaults:init()
|
||||
local menu_container = CenterContainer:new{
|
||||
dimen = Screen:getSize(),
|
||||
}
|
||||
-- FIXME:
|
||||
-- in this use case (an input dialog is closed and the menu container is opened
|
||||
-- immediately) we need to set the full screen dirty because otherwise only
|
||||
-- the input dialog part of the screen is refreshed.
|
||||
menu_container.onShow = function()
|
||||
UIManager:setDirty(nil, "partial")
|
||||
end
|
||||
|
||||
self.defaults_menu = Menu:new{
|
||||
width = Screen:getWidth()-15,
|
||||
|
||||
@@ -580,7 +580,14 @@ function Menu:init()
|
||||
end
|
||||
|
||||
function Menu:onCloseWidget()
|
||||
UIManager:setDirty(nil, "partial", self.dimen)
|
||||
-- FIXME:
|
||||
-- we cannot refresh regionally using the dimen field
|
||||
-- because some menus without menu title use VerticalGroup to include
|
||||
-- a text widget which is not calculated into the dimen.
|
||||
-- For example, it's a dirty hack to use two menus(one this menu and one
|
||||
-- touch menu) in the filemanager in order to capture tap gesture to popup
|
||||
-- the filemanager menu.
|
||||
UIManager:setDirty(nil, "partial")
|
||||
end
|
||||
|
||||
function Menu:updateItems(select_number)
|
||||
|
||||
Reference in New Issue
Block a user