mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
refactor: use new KeyValuePage widget for displaying statistics
This commit is contained in:
@@ -1,14 +1,24 @@
|
||||
--[[--
|
||||
Button widget that shows an "×" and handles closing window when tapped
|
||||
|
||||
Example:
|
||||
|
||||
local parent_widget = HorizontalGroup:new{}
|
||||
table.insert(parent_widget, CloseButton:new{
|
||||
window = parent_widget,
|
||||
})
|
||||
UIManager:show(parent_widget)
|
||||
|
||||
]]
|
||||
|
||||
local InputContainer = require("ui/widget/container/inputcontainer")
|
||||
local FrameContainer = require("ui/widget/container/framecontainer")
|
||||
local TextWidget = require("ui/widget/textwidget")
|
||||
local GestureRange = require("ui/gesturerange")
|
||||
local Font = require("ui/font")
|
||||
|
||||
--[[
|
||||
a button widget that shows an "×" and handles closing window when tapped
|
||||
--]]
|
||||
local CloseButton = InputContainer:new{
|
||||
align = "right",
|
||||
overlap_align = "right",
|
||||
window = nil,
|
||||
}
|
||||
|
||||
@@ -23,7 +33,7 @@ function CloseButton:init()
|
||||
text_widget
|
||||
}
|
||||
|
||||
self.dimen = text_widget:getSize():copy()
|
||||
self.dimen = text_widget:getSize()
|
||||
|
||||
self.ges_events.Close = {
|
||||
GestureRange:new{
|
||||
|
||||
Reference in New Issue
Block a user