Simplify source URL construction

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>
This commit is contained in:
Loren Burkholder 2021-01-16 10:19:26 -05:00 committed by GitHub
parent 7671927fa4
commit 8f7ca298bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -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 {