diff options
author | Florent Revest <revestflo@gmail.com> | 2016-10-31 17:54:28 +0100 |
---|---|---|
committer | Florent Revest <revestflo@gmail.com> | 2016-10-31 17:54:28 +0100 |
commit | 90fec9ef6e4804fb20ecd6a45d341898ff57dfd0 (patch) | |
tree | cbce765eab104cd5683326194dcc52c90e0e2814 | |
parent | f552925b903688fc6326738726f823017f533f89 (diff) |
Remove gradient background
-rw-r--r-- | main.qml | 68 |
1 files changed, 30 insertions, 38 deletions
@@ -50,16 +50,9 @@ Application { } Item { + id: mainPage anchors.fill: parent - Rectangle { - id: mainPage - anchors.fill: parent - gradient: Gradient { - GradientStop { position: 0.0; color: "#e9856e" } - GradientStop { position: 1.0; color: "#d3155b" } - } - state: "zero" states: [ State { name: "zero" }, @@ -87,7 +80,7 @@ Application { MouseArea { anchors.fill: parent - onClicked: { + onClicked: { switch (mainPage.state) { case "zero": case "paused": @@ -101,44 +94,43 @@ Application { break; } } - } + } - IconButton { - id: resetButton - iconColor: "white" - pressedIconColor: "lightgrey" - iconName: "ios-refresh" - visible: mainPage.state === "paused" + IconButton { + id: resetButton + iconColor: "white" + pressedIconColor: "lightgrey" + iconName: "ios-refresh" + visible: mainPage.state === "paused" - hovered: false + hovered: false - anchors { - horizontalCenter: parent.horizontalCenter - topMargin: Units.dp(8) - top: parent.top - } + anchors { + horizontalCenter: parent.horizontalCenter + topMargin: Units.dp(8) + top: parent.top + } - onClicked: { - elapsed = 0; - mainPage.state = "zero" - } + onClicked: { + elapsed = 0; + mainPage.state = "zero" } } + } - Timer { - id: stopwatch + Timer { + id: stopwatch - interval: 100 - repeat: true - running: false - triggeredOnStart: true + interval: 100 + repeat: true + running: false + triggeredOnStart: true - onTriggered: { - var currentTime = new Date - var delta = (currentTime.getTime() - previousTime.getTime()) - previousTime = currentTime - elapsed += delta - } + onTriggered: { + var currentTime = new Date + var delta = (currentTime.getTime() - previousTime.getTime()) + previousTime = currentTime + elapsed += delta } } } |