-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathComboPointsAndSereneState.qml
More file actions
92 lines (74 loc) · 2.44 KB
/
Copy pathComboPointsAndSereneState.qml
File metadata and controls
92 lines (74 loc) · 2.44 KB
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
import QtQuick
import QtQuick.Layouts
import qmlcomponents
GridLayout {
id: comboPointsAndSereneState
property int amountOfCombopoints: 0
property bool isSerene: false
property bool horizontalView: true
rows: horizontalView ? 1 : 8
columns: horizontalView ? 8 : 1
rowSpacing: TibiaStyle.marginNarrow
columnSpacing: TibiaStyle.marginNarrow
component Combopoint: Image {
property bool available: true
source: available ? "/images/icon-combopoint-filled.png" : "/images/icon-combopoint-empty.png"
Tooltip {
anchors.fill: parent
text: qsTrId("statusbar_combopoints_tooltip").arg(amountOfCombopoints)
} //Tooltip
} // Image
Combopoint {
id: firstImage
Layout.row: horizontalView ? 0 : 7
Layout.column: horizontalView ? 0 : 0
available: amountOfCombopoints > 0
} // Combopoint
Combopoint {
Layout.row: horizontalView ? 0 : 6
Layout.column: horizontalView ? 1 : 0
available: amountOfCombopoints > 1
} // Combopoint
Combopoint {
Layout.row: horizontalView ? 0 : 5
Layout.column: horizontalView ? 2 : 0
available: amountOfCombopoints > 2
} // Combopoint
Combopoint {
Layout.row: horizontalView ? 0 : 4
Layout.column: horizontalView ? 3 : 0
available: amountOfCombopoints > 3
} // Combopoint
Combopoint {
Layout.row: horizontalView ? 0 : 3
Layout.column: horizontalView ? 4 : 0
available: amountOfCombopoints > 4
} // Combopoint
TibiaVerticalSeparator {
Layout.row: horizontalView ? 0 : 2
Layout.column: horizontalView ? 5 : 0
Layout.maximumHeight: firstImage.height
Layout.leftMargin: TibiaStyle.marginNarrow
Layout.rightMargin: TibiaStyle.marginNarrow
visible: horizontalView
} //TibiaVerticalSeparator
TibiaHorizontalSeparator {
Layout.row: horizontalView ? 0 : 1
Layout.column: horizontalView ? 6 : 0
Layout.maximumWidth: firstImage.width
Layout.topMargin: TibiaStyle.marginNarrow
Layout.bottomMargin: TibiaStyle.marginNarrow
visible: !horizontalView
} //TibiaHorizontalSeparator
Image {
Layout.row: horizontalView ? 0 : 0
Layout.column: horizontalView ? 7 : 0
source: isSerene ? "/images/icon-serene-on.png" : "/images/icon-serene-off.png"
Tooltip {
anchors.fill: parent
text: "%1
%2".arg(isSerene ? qsTrId("statusbar_serene_on_tooltip") : qsTrId("statusbar_serene_off_tooltip"))
.arg(qsTrId("statusbar_serene_tooltip"))
} //Tooltip
} // Image
} // GridLayout