diff options
author | Luboš Doležel <lubos@dolezel.info> | 2020-02-23 09:42:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-23 09:42:29 +0100 |
commit | 0b4252721a1767d1c891b51e68c30b2eb4a22920 (patch) | |
tree | 1534be94752dcf57ed021a3d83353c2b91a9534c /src/gui | |
parent | 3ce3b15b3337a43fa199c4f0d3e5693cf8eaaecf (diff) | |
parent | 5404ca22fbc826415466bd834e5055404294da0a (diff) | |
download | twinkle-0b4252721a1767d1c891b51e68c30b2eb4a22920.tar twinkle-0b4252721a1767d1c891b51e68c30b2eb4a22920.tar.gz twinkle-0b4252721a1767d1c891b51e68c30b2eb4a22920.tar.lz twinkle-0b4252721a1767d1c891b51e68c30b2eb4a22920.tar.xz twinkle-0b4252721a1767d1c891b51e68c30b2eb4a22920.zip |
Merge pull request #164 from fbriere/fix/qml-binding-loop
Fix QML binding loop in TextImageButton (used in incoming call popup)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/qml/TextImageButton.qml | 8 |
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 } } } |