Menu widget: add extra (left) title button (#8564)

Customizable icon and actions on tap and long-press.
This commit is contained in:
hius07
2021-12-24 13:21:12 +02:00
committed by GitHub
parent 873ceac589
commit a9229ec3aa
3 changed files with 66 additions and 73 deletions

View File

@@ -201,6 +201,7 @@ function Button:setText(text, width)
else
self.text = text
self.width = width
self.label_widget:free()
self:init()
end
end
@@ -210,6 +211,7 @@ function Button:setIcon(icon, width)
if icon ~= self.icon then
self.icon = icon
self.width = width
self.label_widget:free()
self:init()
end
end