workaround to fix #1340

This commit is contained in:
chrox
2014-12-04 10:09:09 +08:00
parent d9fa97df5a
commit b3d79b053a
2 changed files with 15 additions and 1 deletions

View File

@@ -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,

View File

@@ -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)