aboutsummaryrefslogtreecommitdiffstats
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:27:16 +0000
commit54f8d056bc2ee04f343352faa7e7e985e5cc4808 (patch)
tree104776b5927eab75a99ca9a910a503486e5e58b7
parent58e41da173b4ee63309ce94d20471e00fec2ea9a (diff)
Improve missing icon visibility
Widen outline for initial character Change-Id: I00186652685ecc24c90612121c20ce875547cf2b Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com> (cherry picked from commit df2f2f4fde4b867d651787aa8f4b8941aa766e06)
-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" }
}
}
}