mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
TouchMenu: TouchMenuItem's UnderlineContainer should probably have its own dimen object
The coordinates could wonky otherwise, as TouchMenuItem is an InputContainer. Mostly harmless in practice as that UC is its main widget.
This commit is contained in:
@@ -12,7 +12,7 @@ local WidgetContainer = require("ui/widget/container/widgetcontainer")
|
||||
local UnderlineContainer = WidgetContainer:extend{
|
||||
linesize = Size.line.thick,
|
||||
padding = Size.padding.tiny,
|
||||
--- @todo shouldn't this default to black instead?
|
||||
-- We default to white to be invisible by default for FocusManager use-cases (only switching to black @ onFocus)
|
||||
color = Blitbuffer.COLOR_WHITE,
|
||||
vertical_align = "top",
|
||||
}
|
||||
|
||||
@@ -145,8 +145,8 @@ function TouchMenuItem:init()
|
||||
|
||||
self._underline_container = UnderlineContainer:new{
|
||||
vertical_align = "center",
|
||||
dimen = self.dimen,
|
||||
self.item_frame
|
||||
dimen = self.dimen:copy(),
|
||||
self.item_frame,
|
||||
}
|
||||
|
||||
self[1] = self._underline_container
|
||||
|
||||
Reference in New Issue
Block a user