We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c82b334 commit 422fa4bCopy full SHA for 422fa4b
src/core/Icon.qml
@@ -63,10 +63,14 @@ Item {
63
} else if (icon.source.indexOf('icon://') === 0) {
64
var name = icon.source.substring(7)
65
66
- if (name)
67
- return "qrc:/icons/" + name + '.svg'
68
- else
+ if (name) {
+ if (Theme.iconsRoot.indexOf('qrc') != -1)
+ return Theme.iconsRoot + '/' + name + '.svg'
69
+ else
70
+ return Theme.iconsRoot + '/' + name.replace('/', '_') + '.svg'
71
+ } else {
72
return ""
73
+ }
74
} else {
75
return icon.source
76
}
src/core/Theme.qml
@@ -79,6 +79,8 @@ Object {
79
light: false
80
81
82
+ property string iconsRoot: "qrc:/icons"
83
+
84
/*!
85
A utility method for changing the alpha on colors. Returns a new object, and does not modify
86
the original color at all.
0 commit comments