-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHorizontalActionBarContainer.qml
More file actions
49 lines (39 loc) · 1.45 KB
/
HorizontalActionBarContainer.qml
File metadata and controls
49 lines (39 loc) · 1.45 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
import QtQuick
import QtQuick.Layouts
import qmlcomponents
Item {
id: root
property QtObject controller: null
visible: controller != null && controller.actionBarCount > 0
implicitHeight: actionbarLayout.height
RowLayout {
id: actionbarLayout
spacing: 0
anchors {left: parent.left; right: parent.right }
GridLayout {
//grid layout to allow ordering by Layout.row
id: actionBarContainer
objectName: "actionBarContainer"
Layout.fillWidth: true
columns: 1
rowSpacing: TibiaStyle.marginNarrow
} //GridLayout
TibiaButton {
Layout.preferredHeight: root.visible ? actionBarContainer.height : 0
Layout.preferredWidth: TibiaStyle.actionBarLockButtonWidth
imageSourceUp: root.controller != null && root.controller.locked ? "/images/icon-locked.png" : "/images/icon-unlocked.png"
imageSourceDown: root.controller != null && root.controller.locked ? "/images/icon-unlocked.png" : "/images/icon-locked.png"
tooltipText: root.controller != null && root.controller.locked ? qsTrId("actionbar_button_locked_tooltip") : qsTrId("actionbar_button_unlocked_tooltip")
onClicked: {
if (root.controller != null) {
root.controller.onLockButtonClicked();
}
} //onClicked
} //TibiaButton
} //RowLayout
Lenshelp {
anchors.fill: parent
caption: qsTrId("actionbar_lenshelp_caption")
content: qsTrId("actionbar_lenshelp")
} //Lenshelp
} //Item