Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,22 @@ function Button:init()
self.label_widget,
}
end
local background_color, border_color, radius
if self.background then -- colored button
background_color = self.background
border_color = background_color -- without black border
radius = self.radius or Size.radius.button -- with rounded corners
else
background_color = Blitbuffer.COLOR_WHITE
radius = self.radius
end
self.frame = FrameContainer:new{
margin = self.margin,
show_parent = self.show_parent,
bordersize = self.bordersize,
background = self.background,
radius = self.radius,
background = background_color,
color = border_color,
radius = radius,
padding_top = self.padding_v,
padding_bottom = self.padding_v,
padding_left = self.padding_h,
Expand Down