summaryrefslogtreecommitdiffstats
path: root/homescreen
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qt.io>2017-12-25 10:22:24 +0900
committerTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>2017-12-25 07:05:06 +0000
commitdf2f2f4fde4b867d651787aa8f4b8941aa766e06 (patch)
treea2c712a256d4be6292653a6629cc97aa8feb684a /homescreen
parent8b2fa00276456759fffdd97e210f643b46a0cb1e (diff)
Improve missing icon visibility
Widen outline for initial character Change-Id: I00186652685ecc24c90612121c20ce875547cf2b Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Diffstat (limited to 'homescreen')
-rw-r--r--homescreen/qml/IconItem.qml31
1 files changed, 21 insertions, 10 deletions
diff --git a/homescreen/qml/IconItem.qml b/homescreen/qml/IconItem.qml
index 3a34864..a5c032e 100644
--- a/homescreen/qml/IconItem.qml
+++ b/homescreen/qml/IconItem.qml
@@ -6,6 +6,7 @@ Item {
id: main
width: 320
height: 320
+ property string icon: model.icon
Item {
id: container
@@ -25,21 +26,31 @@ Item {
source: './images/%1_%2.svg'.arg(model.icon).arg(loc.pressed && (loc.index === model.index || loc.currentId === model.id) ? 'active' : 'inactive')
antialiasing: item.state !== ''
- Label {
+ property string initial: model.name.substring(0,1).toUpperCase()
+
+ Item {
id: title
- style: Text.Outline
- styleColor: 'red'
- color: 'transparent'
- font.pixelSize: 125
+ width: 125
+ height: 125
anchors.centerIn: parent
- text: model.name.substring(0,1).toUpperCase()
- visible: model.icon === 'blank'
-
+ Repeater {
+ delegate: Label {
+ style: Text.Outline
+ styleColor: 'red'
+ color: 'transparent'
+ font.pixelSize: 125
+ anchors.centerIn: parent
+ anchors.horizontalCenterOffset: model.index / 3 - 1
+ anchors.verticalCenterOffset: model.index % 3 - 1
+ text: item.initial
+ }
+ model: main.icon === 'blank' ? 9 : 0
+ }
layer.enabled: true
layer.effect: LinearGradient {
gradient: Gradient {
- GradientStop { position: -0.5; color: "#6BFBFF" }
- GradientStop { position: +1.5; color: "#00ADDC" }
+ GradientStop { position: -0.5; color: "#6BFBFF" }
+ GradientStop { position: +1.5; color: "#00ADDC" }
}
}
}