From 8f7ca298bc88bace4e4335585885c63e8e548635 Mon Sep 17 00:00:00 2001 From: Loren Burkholder <55629213+LorenDB@users.noreply.github.com> Date: Sat, 16 Jan 2021 10:19:26 -0500 Subject: [PATCH] Simplify source URL construction Co-authored-by: DeepBlueV7.X --- resources/qml/ImageButton.qml | 7 +------ 1 file changed, 1 insertion(+), 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 {