diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-03 11:16:19 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-03 11:16:19 +0200 |
commit | d3490fee9d19bbf9436968f05a78f3a619ae8616 (patch) | |
tree | a6976adbafe42e3a18ed9fe052b9f07e4666cf36 | |
parent | 317b5f74a7c6d3c65a6f37ee7afe48369230ff5b (diff) | |
download | kube-d3490fee9d19bbf9436968f05a78f3a619ae8616.tar.gz kube-d3490fee9d19bbf9436968f05a78f3a619ae8616.zip |
Only allow iconName on icons
-rw-r--r-- | components/package/contents/ui/Icon.qml | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/components/package/contents/ui/Icon.qml b/components/package/contents/ui/Icon.qml index dfddfa6a..74a4971a 100644 --- a/components/package/contents/ui/Icon.qml +++ b/components/package/contents/ui/Icon.qml | |||
@@ -29,16 +29,10 @@ Item { | |||
29 | height: implicitHeight | 29 | height: implicitHeight |
30 | 30 | ||
31 | onIconNameChanged: setImageSource() | 31 | onIconNameChanged: setImageSource() |
32 | onIconSourceChanged: setImageSource() | ||
33 | 32 | ||
34 | function setImageSource() { | 33 | function setImageSource() { |
35 | // Icon names have precedence over icon URLs | 34 | if (root.iconName != "") |
36 | if (root.iconName.indexOf("/") != -1) | ||
37 | image.source = root.iconName; | ||
38 | else if (root.iconName != "") | ||
39 | image.source = "image://kube/" + root.iconName; | 35 | image.source = "image://kube/" + root.iconName; |
40 | else if (root.iconSource != "") | ||
41 | image.source = root.iconSource; | ||
42 | else | 36 | else |
43 | image.source = ""; | 37 | image.source = ""; |
44 | } | 38 | } |