aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Revest <revestflo@gmail.com>2016-10-31 17:54:28 +0100
committerFlorent Revest <revestflo@gmail.com>2016-10-31 17:54:28 +0100
commit90fec9ef6e4804fb20ecd6a45d341898ff57dfd0 (patch)
treecbce765eab104cd5683326194dcc52c90e0e2814
parentf552925b903688fc6326738726f823017f533f89 (diff)
Remove gradient background
-rw-r--r--main.qml68
1 files changed, 30 insertions, 38 deletions
diff --git a/main.qml b/main.qml
index 9d80ad0..9de8f57 100644
--- a/main.qml
+++ b/main.qml
@@ -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
}
}
}