aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qt.io>2017-12-14 13:51:11 +0900
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-12-17 23:14:29 +0000
commit848a124060480c3254f18080417af57d7b87617f (patch)
tree245dd9f336928defe574e0545fd7da68cd93c4e1
parenta4436f38be347ce6edf11ec1d1fd725ff8659d48 (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> (cherry picked from commit 096c0729d0babd4adc3deeced69439ea38af8d7d)
-rw-r--r--homescreen/qml/IconItem.qml15
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