Skip to content

Commit 4f11e01

Browse files
committed
qml: Add color properties to ContinueButton
This allows components using the ContinueButton to apply their own color variations.
1 parent a7ccfc3 commit 4f11e01

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/qml/controls/ContinueButton.qml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,38 @@ import org.bitcoincore.qt 1.0
99
Button {
1010
id: root
1111
hoverEnabled: AppMode.isDesktop
12+
13+
property color textColor: Theme.color.white
14+
property color backgroundColor: Theme.color.orange
15+
property color backgroundHoverColor: Theme.color.orangeLight1
16+
property color backgroundPressedColor: Theme.color.orangeLight2
17+
property color borderColor: "transparent"
18+
property color borderHoverColor: "transparent"
19+
property color borderPressedColor: "transparent"
20+
1221
contentItem: CoreText {
1322
text: parent.text
23+
color: root.textColor
1424
bold: true
1525
font.pixelSize: 18
1626
}
1727
background: Rectangle {
1828
id: bg
1929
implicitHeight: 46
20-
color: Theme.color.orange
30+
color: backgroundColor
31+
border.color: borderColor
2132
radius: 5
2233

2334
states: [
2435
State {
2536
name: "PRESSED"; when: root.pressed
26-
PropertyChanges { target: bg; color: Theme.color.orangeLight2 }
37+
PropertyChanges { target: bg; color: backgroundPressedColor }
38+
PropertyChanges { target: bg; border.color: borderPressedColor }
2739
},
2840
State {
2941
name: "HOVER"; when: root.hovered
30-
PropertyChanges { target: bg; color: Theme.color.orangeLight1 }
42+
PropertyChanges { target: bg; color: backgroundHoverColor }
43+
PropertyChanges { target: bg; border.color: borderHoverColor }
3144
}
3245
]
3346

0 commit comments

Comments
 (0)