summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/qml/TextImageButton.qml8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/qml/TextImageButton.qml b/src/gui/qml/TextImageButton.qml
index 83f61d7..c183630 100644
--- a/src/gui/qml/TextImageButton.qml
+++ b/src/gui/qml/TextImageButton.qml
@@ -12,6 +12,12 @@ Rectangle {
signal clicked
color: "red"
+ // Pre-compute this to avoid binding color to itself
+ property color darkerColor
+ Component.onCompleted: {
+ darkerColor = Qt.darker(color)
+ }
+
z: 2
Image {
@@ -53,7 +59,7 @@ Rectangle {
states: State {
name: "pressed"; when: mouseArea.pressed
- PropertyChanges { target: backgroundRect; color: Qt.darker(color) }
+ PropertyChanges { target: backgroundRect; color: darkerColor }
}
}