diff options
author | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2017-12-14 13:51:11 +0900 |
---|---|---|
committer | Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com> | 2017-12-17 07:01:49 +0000 |
commit | 096c0729d0babd4adc3deeced69439ea38af8d7d (patch) | |
tree | c090660f413002be9ded15a20378e21d11684cee /homescreen | |
parent | 31b54cb905670effcb65f97c535404fd0f653d9f (diff) |
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 <tasuku.suzuki@qt.io>
Diffstat (limited to 'homescreen')
-rw-r--r-- | homescreen/qml/IconItem.qml | 15 |
1 files 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 |