feat: add property for always showing icon button bg
This commit is contained in:
+3
-1
@@ -13,6 +13,8 @@ Button {
|
|||||||
|
|
||||||
required property string source
|
required property string source
|
||||||
property bool useOriginalColor: false
|
property bool useOriginalColor: false
|
||||||
|
// Shows the highlight background even when not pressed
|
||||||
|
property bool showBackground: false
|
||||||
|
|
||||||
icon.source: control.source
|
icon.source: control.source
|
||||||
icon.width: 20
|
icon.width: 20
|
||||||
@@ -24,7 +26,7 @@ Button {
|
|||||||
implicitWidth: 100
|
implicitWidth: 100
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
visible: !control.flat || control.down || control.checked || control.highlighted
|
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
|
border.width: 0
|
||||||
// custom
|
// custom
|
||||||
radius: Theme.radius
|
radius: Theme.radius
|
||||||
|
|||||||
Reference in New Issue
Block a user