aboutsummaryrefslogtreecommitdiffstats
path: root/app/pages/DetailPage.qml
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-11-22 14:48:25 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-11-22 14:48:25 +0900
commit94db06ff082d2b5e1ad99ed52c844dcec0d070ca (patch)
treeaafd38d58cde9f24055df218b970e2bf493a042c /app/pages/DetailPage.qml
parent31e4ddecb2e704ab81303568102f786ea727d0cf (diff)
change blank icons
Diffstat (limited to 'app/pages/DetailPage.qml')
-rw-r--r--app/pages/DetailPage.qml17
1 files changed, 15 insertions, 2 deletions
diff --git a/app/pages/DetailPage.qml b/app/pages/DetailPage.qml
index 043714d..45e5202 100644
--- a/app/pages/DetailPage.qml
+++ b/app/pages/DetailPage.qml
@@ -56,9 +56,22 @@ import QtQuick.Controls 2.0
Item {
Layout.preferredWidth: 200
Layout.preferredHeight: 200
- Image {
+
+ Image {
+ id: imageicon
anchors.fill: parent
- source: model.icon
+ source: model.icon != ""?model.icon : 'qrc:/images/blank.svg'
+ property string initial: model.name.substring(0,1).toUpperCase()
+
+ Label {
+ style: Text.Outline
+ styleColor: "#00ADDC"
+ color: 'transparent'
+ font.pixelSize: parent.height * 0.5
+ anchors.centerIn: parent
+ text: parent.initial
+ visible: model.icon == ""
+ }
}
}