feat: add property for always showing icon button bg

This commit is contained in:
talksik
2025-04-13 09:28:02 -07:00
parent 3a02ec0da9
commit a76422920f
+3 -1
View File
@@ -13,6 +13,8 @@ Button {
required property string source
property bool useOriginalColor: false
// Shows the highlight background even when not pressed
property bool showBackground: false
icon.source: control.source
icon.width: 20
@@ -24,7 +26,7 @@ Button {
implicitWidth: 100
implicitHeight: 40
visible: !control.flat || control.down || control.checked || control.highlighted
color: control.down ? Theme.highlight : "transparent"
color: control.down || control.showBackground ? Theme.highlight : "transparent"
border.width: 0
// custom
radius: Theme.radius