From 53b16c5d809d0f1c82b414abc366bd9ae65075c5 Mon Sep 17 00:00:00 2001 From: Florent Revest Date: Wed, 16 Nov 2016 20:47:31 +0100 Subject: Use a new colorscheme for the FlatMesh background --- asteroid-stopwatch.desktop | 3 ++- main.qml | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/asteroid-stopwatch.desktop b/asteroid-stopwatch.desktop index 43e2f9f..58c0177 100644 --- a/asteroid-stopwatch.desktop +++ b/asteroid-stopwatch.desktop @@ -10,4 +10,5 @@ Name[ru_RU]=секундомер Categories=Applications; Exec=invoker --type=qtcomponents-qt5 /usr/bin/asteroid-stopwatch Icon=ios-stopwatch-outline -X-Desktop-File-Install-Version=0.20 +X-Asteroid-Center-Color=#b01c7e +X-Asteroid-Outer-Color=#420a2f diff --git a/main.qml b/main.qml index 9de8f57..9c7c215 100644 --- a/main.qml +++ b/main.qml @@ -24,6 +24,9 @@ import org.asteroid.controls 1.0 Application { id: app + centerColor: "#b01c7e" + outerColor: "#420a2f" + property bool running property var previousTime property int elapsed: 0 @@ -36,16 +39,16 @@ Application { var mod = Math.abs(usec) if (mod >= 3600000) { // Hours + Minutes + Seconds return '' + Math.floor(mod / 3600000) + 'h' + '
' + - '' + zeroPad(Math.floor((mod % 3600000) / 60000)) + 'm' + + '' + zeroPad(Math.floor((mod % 3600000) / 60000)) + 'm' + zeroPad(Math.floor((mod % 60000) / 1000)) + 's' } else if (mod >= 60000) { // Minutes + Seconds + Tenth return '' + zeroPad(Math.floor((mod % 3600000) / 60000)) + 'm' + '
' + - '' + zeroPad(Math.floor((mod % 60000) / 1000)) + 's' + + '' + zeroPad(Math.floor((mod % 60000) / 1000)) + 's' + Math.floor((mod % 1000) / 100) + '' } else { // Seconds + Tenth - return '' + zeroPad(Math.floor((mod % 60000) / 1000)) + 's' + '' + - '' + Math.floor((mod % 1000) / 100) + '' + return '' + zeroPad(Math.floor((mod % 60000) / 1000)) + 's' + '' + + '' + Math.floor((mod % 1000) / 100) + '' } } -- cgit v1.2.3-70-g09d2