1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-01-27 00:56:38 +00:00
UTPass/qml/pages/headers/MainHeader.qml

68 lines
1.6 KiB
QML
Raw Normal View History

import Lomiri.Components 1.3
2025-01-10 15:28:42 +01:00
import QtQuick 2.4
2019-09-20 21:29:39 +02:00
PageHeader {
id: mainHeader
2025-01-10 15:28:42 +01:00
2019-09-20 21:29:39 +02:00
width: parent.width
height: units.gu(6)
title: i18n.tr("UTPass")
trailingActionBar.height: units.gu(4)
trailingActionBar.numberOfSlots: 2
trailingActionBar.actions: [
/*Action { TODO
iconName: "search"
text: i18n.tr("Search")
onTriggered: {
searchBar.visible = !searchBar.visible
labelTitle.visible = !searchBar.visible
if (searchBar.visible === true) {
searchBar.focus = true
}
}
},*/
Action {
iconName: "settings"
text: i18n.tr("Settings")
onTriggered: {
2025-01-10 15:28:42 +01:00
pageStack.push(Qt.resolvedUrl("../settings/Settings.qml"));
2019-09-20 21:29:39 +02:00
}
},
Action {
iconName: "info"
text: i18n.tr("Info")
onTriggered: {
2025-01-10 15:28:42 +01:00
pageStack.push(Qt.resolvedUrl("../Info.qml"));
2019-09-20 21:29:39 +02:00
}
}
]
2025-01-10 15:28:42 +01:00
contents: Item {
height: parent.height
width: parent.width
Label {
id: labelTitle
text: mainHeader.title
anchors.verticalCenter: parent.verticalCenter
visible: true
}
TextField {
id: searchBar
anchors.right: parent.right
anchors.left: parent.left
placeholderText: i18n.tr("Search")
height: units.gu(4)
visible: false
anchors.verticalCenter: parent.verticalCenter
onFocusChanged: {
}
}
}
2019-09-20 21:29:39 +02:00
}