From 096c0729d0babd4adc3deeced69439ea38af8d7d Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Thu, 14 Dec 2017 13:51:11 +0900 Subject: Apply LinearGradient to first letters drawn when icon is missing The letter was originally drawn with a single color '#00ADDC'. Because background circle in each icon has a gradient, nice to draw it with the same gradient. Change-Id: Ic337989403bfa26003bdfda2f2e2b4aad819ebe2 Signed-off-by: Tasuku Suzuki --- homescreen/qml/IconItem.qml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/homescreen/qml/IconItem.qml b/homescreen/qml/IconItem.qml index b0373d2..1c189e6 100644 --- a/homescreen/qml/IconItem.qml +++ b/homescreen/qml/IconItem.qml @@ -1,5 +1,6 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 +import QtGraphicalEffects 1.0 Item { id: main @@ -13,9 +14,19 @@ Item { y: 60 font.pixelSize: 125 anchors.horizontalCenter: parent.horizontalCenter - color: "#00ADDC" - text: model.icon == 'Blank' ? model.name.substring(0,1).toUpperCase() : '' + text: model.name.substring(0,1).toUpperCase() + visible: false } + LinearGradient { + anchors.fill: title + source: title + gradient: Gradient { + GradientStop { position: -0.5; color: "#6BFBFF" } + GradientStop { position: +1.5; color: "#00ADDC" } + } + visible: model.icon === 'Blank' + } + Label { id: name -- cgit 1.2.3-korg