From 5cc7192387c8004d6dc0261e879b97735715cbab Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Thu, 19 Dec 2024 22:29:48 +0100 Subject: [PATCH] =?UTF-8?q?Move=20the=20logout=20button=20to=20the=20page?= =?UTF-8?q?=E2=80=99s=20toolbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ReservationsPage.qml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/ReservationsPage.qml b/src/ReservationsPage.qml index 0226768..cd8d045 100644 --- a/src/ReservationsPage.qml +++ b/src/ReservationsPage.qml @@ -1,23 +1,22 @@ pragma ComponentBehavior: Bound -import QtQuick import QtQuick.Controls +import QtQuick.Layouts Page { title: qsTr("Reservations") - Button { - action: logoutAction - } + header: ToolBar { + RowLayout { + anchors.fill: parent - Action { - id: logoutAction + ToolButton { + icon.name: "system-log-out" + text: qsTr("&Log out") - icon.name: "system-log-out" - shortcut: "Ctrl+L" - text: qsTr("&Log out") - - onTriggered: function () { - Database.close(); + onClicked: function () { + Database.close(); + } + } } } }