From df2f2f4fde4b867d651787aa8f4b8941aa766e06 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Mon, 25 Dec 2017 10:22:24 +0900 Subject: Improve missing icon visibility Widen outline for initial character Change-Id: I00186652685ecc24c90612121c20ce875547cf2b Signed-off-by: Tasuku Suzuki --- homescreen/qml/IconItem.qml | 31 +++++++++++++++++++++---------- 1 file 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" } } } } -- cgit 1.2.3-korg