aboutsummaryrefslogtreecommitdiffstats
path: root/app/pages/ManagementPage.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/ManagementPage.qml
parent31e4ddecb2e704ab81303568102f786ea727d0cf (diff)
change blank icons
Diffstat (limited to 'app/pages/ManagementPage.qml')
-rw-r--r--app/pages/ManagementPage.qml23
1 files changed, 19 insertions, 4 deletions
diff --git a/app/pages/ManagementPage.qml b/app/pages/ManagementPage.qml
index 9a4cf31..e445c63 100644
--- a/app/pages/ManagementPage.qml
+++ b/app/pages/ManagementPage.qml
@@ -47,9 +47,22 @@ Page {
Item {
Layout.preferredWidth: 100
Layout.preferredHeight: 100
- Image {
+
+ Image {
+ id: imageicon
anchors.fill: parent
- source: 'file://' + model.icon
+ source: model.icon != ""?'file://' + 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 == ""
+ }
}
}
ColumnLayout {
@@ -77,7 +90,8 @@ Page {
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
Button {
- x: x - 6
+ anchors.right: parent.right
+ anchors.rightMargin: 6
text: 'Launch'
onClicked: {
if (listView.model.launch(model.id) > 1) {
@@ -90,7 +104,8 @@ Page {
implicitHeight: 40
}
Button {
- x: x - 6
+ anchors.right: parent.right
+ anchors.rightMargin: 6
visible: model.name.toUpperCase() != "HOMESCREEN" && model.name.toUpperCase() != "LAUNCHER"
text: 'Uninstall'
onClicked: {