aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-10-12 10:43:19 -0400
committerKen Moore <ken@ixsystems.com>2017-10-12 10:43:19 -0400
commit910fce821941ccf0671d5ec9508b6a5df4922277 (patch)
treeef8a642920c3fde0e486804959311c7d75b12c5d /src-qt5
parentAdd a new screensaver: Warp (diff)
downloadlumina-910fce821941ccf0671d5ec9508b6a5df4922277.tar.gz
lumina-910fce821941ccf0671d5ec9508b6a5df4922277.tar.bz2
lumina-910fce821941ccf0671d5ec9508b6a5df4922277.zip
Add some color to the "Warp" starfield.
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml11
1 files changed, 9 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml
index 4ad4378f..08ae15a0 100644
--- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml
+++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml
@@ -5,7 +5,13 @@ Rectangle {
id : canvas
anchors.fill: parent
color: "black"
-
+
+ function getStarColor(num){
+ if(num < 0.5) { return "white" }
+ if(num < 1.5) { return "mistyrose" }
+ return "lightblue"
+ }
+
// CREATE STARFIELD
Repeater {
model: Math.round(Math.random()*canvas.width/10)+500
@@ -16,7 +22,8 @@ Rectangle {
width: Math.round(Math.random()*3)+3
height: width
radius: width/2
- color: "white"
+ color: getStarColor( (index%3) )
+
}
} //end of Repeater
bgstack15