Use ES6 template strings

This commit is contained in:
miruka
2019-11-18 03:57:13 -04:00
parent 2123f5a66f
commit 5a70adcc93
10 changed files with 18 additions and 27 deletions

View File

@@ -8,12 +8,7 @@ Image {
fillMode: Image.PreserveAspectFit
visible: Boolean(svgName)
source:
svgName ?
("../../icons/" + (theme ? theme.icons.preferredPack : "thin") +
"/" + svgName + ".svg") :
""
source: svgName ? `../../icons/${iconPack}/${svgName}.svg` : ""
sourceSize.width: svgName ? dimension : 0
sourceSize.height: svgName ? dimension : 0
@@ -21,6 +16,7 @@ Image {
property string svgName: ""
property int dimension: 20
property color colorize: theme.icons.colorize
property string iconPack: theme ? theme.icons.preferredPack : "thin"
layer.enabled: ! Qt.colorEqual(colorize, "transparent")