-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeter_widget.gui
56 lines (47 loc) · 2.12 KB
/
meter_widget.gui
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
<!--
* Copyright 2018 Peter Magnusson <[email protected]>
-->
<defs>
<!-- blue is the default color -->
<symbol id="meter-blue" type="meter-widget">
<svg width="80" height="80" class="meter-widget">
<image id="image" x="50%-16" y="50%-16" width="32" height="32" fill="#4edcfb" display="none" />
<!-- TODO: Some g thing to possibly rotate the arc for a different starting position -->
<arc x="5" y="5" width="100%-10" height="100%-10" fill="#3f3f3f" arc-width="4" start-angle="0" sweep-angle="360" />
<arc id="arc" x="5" y="5" width="100%-10" height="100%-10" fill="#4edcfb" arc-width="4" start-angle="0" sweep-angle="0" />
<gradientRect id="shade" width="100%" height="100%"
gradient-type="linear"
gradient-x1="0" gradient-y1="50%"
gradient-x2="0" gradient-y2="100%"
gradient-color1="#000000"
gradient-color2="#000000"
gradient-opacity1="0"
gradient-opacity2="0.6"/>
</svg>
</symbol>
<symbol id="meter-orange" href="#meter-blue">
<set href="#arc" attributeName="fill" to="#ff882c" />
</symbol>
<symbol id="meter-green" href="#meter-blue">
<set href="#arc" attributeName="fill" to="fb-green" />
</symbol>
<symbol id="meter-red" href="#meter-blue">
<set href="#arc" attributeName="fill" to="fb-red" />
</symbol>
<!-- icon based meters -->
<symbol id="meter-blue-icon" href="#meter-blue">
<set href="#image" attributeName="display" to="inline" />
</symbol>
<symbol id="meter-orange-icon" href="#meter-orange">
<set href="#image" attributeName="fill" to="#ff882c" />
<set href="#image" attributeName="display" to="inline" />
</symbol>
<symbol id="meter-green-icon" href="#meter-green">
<set href="#image" attributeName="fill" to="fb-green" />
<set href="#image" attributeName="display" to="inline" />
</symbol>
<symbol id="meter-red-icon" href="#meter-red">
<set href="#image" attributeName="fill" to="fb-red" />
<set href="#image" attributeName="display" to="inline" />
</symbol>
</defs>