summary refs log tree commit diff
diff options
context:
space:
mode:
authorLoren Burkholder <55629213+LorenDB@users.noreply.github.com>2021-01-16 10:19:26 -0500
committerGitHub <noreply@github.com>2021-01-16 10:19:26 -0500
commit8f7ca298bc88bace4e4335585885c63e8e548635 (patch)
tree8c6facc0a0f237209695a12cb4c92da093e72a8b
parentRemove unnecessary properties; simplify hover code (diff)
downloadnheko-8f7ca298bc88bace4e4335585885c63e8e548635.tar.xz
Simplify source URL construction
Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>
-rw-r--r--resources/qml/ImageButton.qml7
1 files changed, 1 insertions, 6 deletions
diff --git a/resources/qml/ImageButton.qml b/resources/qml/ImageButton.qml

index 7e3e0849..58e0a2a9 100644 --- a/resources/qml/ImageButton.qml +++ b/resources/qml/ImageButton.qml
@@ -19,12 +19,7 @@ AbstractButton { // Workaround, can't get icon.source working for now... anchors.fill: parent - source: { - var src = "image://colorimage/" + image; - if (changeColorOnHover) - src += "?" + (button.hovered ? highlightColor : buttonTextColor); - return src; - } + source: "image://colorimage/" + image + "?" + ((button.hovered && changeColorOnHover) ? highlightColor : buttonTextColor) } MouseArea {