summaryrefslogtreecommitdiffstats
path: root/app/pages
diff options
context:
space:
mode:
Diffstat (limited to 'app/pages')
-rw-r--r--app/pages/DImage.qml38
-rw-r--r--app/pages/DetailPage.qml19
-rw-r--r--app/pages/ListPage.qml19
-rw-r--r--app/pages/ManagementPage.qml19
4 files changed, 50 insertions, 45 deletions
diff --git a/app/pages/DImage.qml b/app/pages/DImage.qml
new file mode 100644
index 0000000..a727be7
--- /dev/null
+++ b/app/pages/DImage.qml
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2018 The Qt Company Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+Image {
+ id: imageicon
+ property string icon: ""
+ property string name: ""
+
+ anchors.fill: parent
+ source: icon != ""?icon : 'qrc:/images/blank.svg'
+ property string initial: name.substring(0,1).toUpperCase()
+
+ Label {
+ style: Text.Outline
+ styleColor: "#66FF99"
+ color: 'transparent'
+ font.pixelSize: parent.height * 0.4
+ anchors.centerIn: parent
+ text: parent.initial
+ visible: icon == ""
+ }
+}
diff --git a/app/pages/DetailPage.qml b/app/pages/DetailPage.qml
index 45e5202..c1eca33 100644
--- a/app/pages/DetailPage.qml
+++ b/app/pages/DetailPage.qml
@@ -57,21 +57,10 @@ import QtQuick.Controls 2.0
Layout.preferredWidth: 200
Layout.preferredHeight: 200
- Image {
- id: imageicon
- anchors.fill: parent
- 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 == ""
- }
+ DImage {
+ id: imageicon
+ icon: model.icon
+ name: model.name
}
}
diff --git a/app/pages/ListPage.qml b/app/pages/ListPage.qml
index c9116d4..a25535e 100644
--- a/app/pages/ListPage.qml
+++ b/app/pages/ListPage.qml
@@ -77,21 +77,10 @@ Page {
}
}
- Image {
- id: imageicon
- anchors.fill: parent
- 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 == ""
- }
+ DImage {
+ id: imageicon
+ icon: model.icon
+ name: model.name
}
}
diff --git a/app/pages/ManagementPage.qml b/app/pages/ManagementPage.qml
index e445c63..b622706 100644
--- a/app/pages/ManagementPage.qml
+++ b/app/pages/ManagementPage.qml
@@ -48,21 +48,10 @@ Page {
Layout.preferredWidth: 100
Layout.preferredHeight: 100
- Image {
- id: imageicon
- anchors.fill: parent
- 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 == ""
- }
+ DImage {
+ id: imageicon
+ icon: model.icon != ""?'file://' + model.icon : ''
+ name: model.name
}
}
ColumnLayout {