diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-08-27 19:45:41 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-11-23 21:50:58 +0100 |
commit | cd1d46a26b923260b6c87cc93a0723b8166c609e (patch) | |
tree | 81d0fafeaeda6f5d72ec03f589cf8560cea32ed8 /gui/components/Header.qml | |
parent | 76585f828a36c08614df84f43d64e20fb0e7a425 (diff) |
[ui] refactor ui
Diffstat (limited to 'gui/components/Header.qml')
-rw-r--r-- | gui/components/Header.qml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gui/components/Header.qml b/gui/components/Header.qml new file mode 100644 index 0000000..92f4bdd --- /dev/null +++ b/gui/components/Header.qml @@ -0,0 +1,32 @@ +import QtQuick 2.0 +import QtQuick.Controls 2.4 +import QtQuick.Dialogs 1.2 +import QtQuick.Controls.Material 2.1 + +ToolBar { + visible: stackView.depth > 1 + Material.foreground: Material.Black + Material.background: "#ffffff" + Material.elevation: 0 + + contentHeight: settingsButton.implicitHeight + + ToolButton { + id: settingsButton + anchors.left: parent.left + font.pixelSize: Qt.application.font.pixelSize * 1.6 + icon.source: "../resources/arrow-left.svg" + onClicked: { + if (stackView.depth > 1) { + stackView.pop() + } else { + settingsDrawer.open() + } + } + } + + Label { + text: stackView.currentItem.title + anchors.centerIn: parent + } +} |