-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathFuelLevel.qml
More file actions
42 lines (35 loc) · 816 Bytes
/
FuelLevel.qml
File metadata and controls
42 lines (35 loc) · 816 Bytes
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
import QtQuick 2.12
import QtGraphicalEffects 1.0
Item{
id: fuelLevel
width: 75
height: 150
property alias scale_value: valueBar.height
property alias color: valueBar.color
Rectangle {
id: maskObj
anchors.fill: parent
color: "black"
Rectangle {
id: valueBar
width: parent.width
border.width: 0
anchors.bottom: parent.bottom
}
smooth: true
visible: false
}
Image {
id: maskImage
source: "qrc:/images/maskFuelLevel.png"
sourceSize: Qt.size(parent.width, parent.height)
smooth: true
visible: false
}
OpacityMask {
id: maskEffect
anchors.fill: parent
source: maskObj
maskSource: maskImage
}
}