move screenshot settings to submenu of Screenshot entry in readermenu

And also fix a touchmenu bug that prevent some menu entries
(always at the bottom of the menu) from showing submenus. The reason is
that the onTapSelect method of TouchMenuItem doesn't return true, so that
the tap gesture will propagate to the parent widget and be captured by
touchmenu itself. But at this time the dimen of touchmenu is changed to
the submenu of the tapped menuitem. If the submenu is short enough the
tap will be outside of touchmenu which will cause a TapCloseAllMenus
event and the submenu will never be shown.
This commit is contained in:
chrox
2014-10-30 15:51:31 +08:00
parent f48c073357
commit dfcd67c5bf
2 changed files with 30 additions and 25 deletions

View File

@@ -103,6 +103,7 @@ function TouchMenuItem:onTapSelect(arg, ges)
UIManager:setDirty(self.show_parent, "partial")
end)
self.menu:onMenuSelect(self.item)
return true
end
function TouchMenuItem:onHoldSelect(arg, ges)
@@ -119,6 +120,7 @@ function TouchMenuItem:onHoldSelect(arg, ges)
UIManager:setDirty(self.show_parent, "partial")
end)
self.menu:onMenuHold(self.item)
return true
end
--[[
@@ -331,11 +333,11 @@ function TouchMenu:init()
self.device_info = HorizontalGroup:new{
self.time_info,
self.net_info,
}
else
}
else
self.device_info = HorizontalGroup:new{
self.time_info,
}
}
end
local footer_width = self.width - self.padding*2 - self.bordersize*2
self.footer = HorizontalGroup:new{