-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathanalog-nort.qml
98 lines (83 loc) · 2.74 KB
/
analog-nort.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
* Copyright (C) 2022 - Timo Könnecke <github.com/eLtMosen>
* 2016 - Sylvia van Os <[email protected]>
* 2015 - Florent Revest <[email protected]>
* 2012 - Vasiliy Sorokin <[email protected]>
* Aleksey Mikhailichenko <[email protected]>
* Arto Jalkanen <[email protected]>
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.15
import QtGraphicalEffects 1.15
Item {
id: root
property string imgPath: "../watchfaces-img/analog-nort-"
Image {
id: hourSVG
anchors.centerIn: root
source: imgPath + "hour.svg"
width: root.width
height: root.height
transform: Rotation {
origin.x: root.width / 2
origin.y: root.height / 2
angle: (wallClock.time.getHours() * 30) + (wallClock.time.getMinutes() * .5)
}
}
Image {
id: minuteSVG
anchors.centerIn: root
source: imgPath + "minute.svg"
width: root.width
height: root.height
transform: Rotation {
origin.x: root.width / 2
origin.y: root.height / 2
angle: (wallClock.time.getMinutes() * 6)+(wallClock.time.getSeconds() * 6 / 60)
}
}
Image {
id: secondSVG
anchors.centerIn: root
source: imgPath + "second.svg"
width: root.width
height: root.height
visible: !displayAmbient
transform: Rotation {
origin.x: root.width / 2
origin.y: root.height / 2
angle: (wallClock.time.getSeconds() * 6)
Behavior on angle {
enabled: !displayAmbient
RotationAnimation {
duration: 1000
direction: RotationAnimation.Clockwise
}
}
}
}
layer {
enabled: true
effect: DropShadow {
transparentBorder: true
horizontalOffset: 0
verticalOffset: 0
radius: 8.0
samples: 12
color: "#66fbfb"
}
}
}