mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
refactoring using centercontainer in button widget
This commit is contained in:
@@ -36,10 +36,12 @@ function Button:init()
|
||||
background = self.background,
|
||||
radius = self.radius,
|
||||
padding = self.padding,
|
||||
HorizontalGroup:new{
|
||||
HorizontalSpan:new{ width = (self.width - text_size.w)/2 },
|
||||
CenterContainer:new{
|
||||
dimen = Geom:new{
|
||||
w = self.width,
|
||||
h = text_size.h
|
||||
},
|
||||
self.text_widget,
|
||||
HorizontalSpan:new{ width = (self.width - text_size.w)/2 },
|
||||
}
|
||||
}
|
||||
if self.preselect then
|
||||
|
||||
Reference in New Issue
Block a user