Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F112591
D23.1732337748.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D23.1732337748.diff
View Options
diff --git a/src/contents/ui/ActionSettingsPage.qml b/src/contents/ui/ActionSettingsPage.qml
--- a/src/contents/ui/ActionSettingsPage.qml
+++ b/src/contents/ui/ActionSettingsPage.qml
@@ -6,9 +6,10 @@
import org.kde.kirigami 2.13 as Kirigami
+import '.' as Kazv
import 'shortcuts' as KazvShortcuts
-Kirigami.ScrollablePage {
+Kazv.ClosableScrollablePage {
id: page
property alias actions: settings.actions
title: l10n.get('action-settings-page-title')
diff --git a/src/contents/ui/ClosableScrollablePage.qml b/src/contents/ui/ClosableScrollablePage.qml
new file mode 100644
--- /dev/null
+++ b/src/contents/ui/ClosableScrollablePage.qml
@@ -0,0 +1,20 @@
+/*
+ * This file is part of kazv.
+ * SPDX-FileCopyrightText: 2024 tusooa <tusooa@kazv.moe>
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+import QtQuick 2.2
+import QtQuick.Layouts 1.15
+import QtQuick.Controls 2.15
+
+import org.kde.kirigami 2.13 as Kirigami
+
+import '.' as Kazv
+
+Kirigami.ScrollablePage {
+ onBackRequested: (event) => {
+ event.accepted = true;
+ applicationWindow().pageStack.pop();
+ }
+}
diff --git a/src/contents/ui/CreateRoomPage.qml b/src/contents/ui/CreateRoomPage.qml
--- a/src/contents/ui/CreateRoomPage.qml
+++ b/src/contents/ui/CreateRoomPage.qml
@@ -14,7 +14,7 @@
import moe.kazv.mxc.kazv 0.0 as MK
-Kirigami.ScrollablePage {
+Kazv.ClosableScrollablePage {
id: createRoomPage
title: l10n.get('create-room-page-title')
diff --git a/src/contents/ui/SettingsPage.qml b/src/contents/ui/SettingsPage.qml
--- a/src/contents/ui/SettingsPage.qml
+++ b/src/contents/ui/SettingsPage.qml
@@ -10,9 +10,10 @@
import org.kde.kirigami 2.13 as Kirigami
+import '.' as Kazv
import 'settings' as Settings
-Kirigami.ScrollablePage {
+Kazv.ClosableScrollablePage {
id: settingsPage
title: l10n.get('settings-page-title')
diff --git a/src/contents/ui/UserPage.qml b/src/contents/ui/UserPage.qml
--- a/src/contents/ui/UserPage.qml
+++ b/src/contents/ui/UserPage.qml
@@ -15,7 +15,7 @@
import 'device-mgmt' as KazvDM
import 'matrix-helpers.js' as Helpers
-Kirigami.ScrollablePage {
+Kazv.ClosableScrollablePage {
id: userPage
property string userId: ''
diff --git a/src/contents/ui/room-settings/RoomInvitePage.qml b/src/contents/ui/room-settings/RoomInvitePage.qml
--- a/src/contents/ui/room-settings/RoomInvitePage.qml
+++ b/src/contents/ui/room-settings/RoomInvitePage.qml
@@ -13,7 +13,7 @@
import '..' as Kazv
import '../matrix-helpers.js' as Helpers
-Kirigami.ScrollablePage {
+Kazv.ClosableScrollablePage {
id: roomInvitePage
property var room
diff --git a/src/contents/ui/room-settings/RoomMemberListPage.qml b/src/contents/ui/room-settings/RoomMemberListPage.qml
--- a/src/contents/ui/room-settings/RoomMemberListPage.qml
+++ b/src/contents/ui/room-settings/RoomMemberListPage.qml
@@ -14,7 +14,7 @@
import '..' as Kazv
-Kirigami.ScrollablePage {
+Kazv.ClosableScrollablePage {
id: roomSettingsPage
property var room
diff --git a/src/contents/ui/room-settings/RoomSettingsPage.qml b/src/contents/ui/room-settings/RoomSettingsPage.qml
--- a/src/contents/ui/room-settings/RoomSettingsPage.qml
+++ b/src/contents/ui/room-settings/RoomSettingsPage.qml
@@ -15,7 +15,7 @@
import '..' as Kazv
import '.' as RoomSettings
-Kirigami.ScrollablePage {
+Kazv.ClosableScrollablePage {
id: roomSettingsPage
property var room
diff --git a/src/resources.qrc b/src/resources.qrc
--- a/src/resources.qrc
+++ b/src/resources.qrc
@@ -5,6 +5,7 @@
<file alias="MainPage.qml">contents/ui/MainPage.qml</file>
<file alias="TabView.qml">contents/ui/TabView.qml</file>
<file alias="Tab.qml">contents/ui/Tab.qml</file>
+ <file alias="ClosableScrollablePage.qml">contents/ui/ClosableScrollablePage.qml</file>
<file alias="RoomListView.qml">contents/ui/RoomListView.qml</file>
<file alias="RoomListViewItemDelegate.qml">contents/ui/RoomListViewItemDelegate.qml</file>
<file alias="RoomPage.qml">contents/ui/RoomPage.qml</file>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 8:55 PM (4 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39088
Default Alt Text
D23.1732337748.diff (3 KB)
Attached To
Mode
D23: Make all secondary pages closable
Attached
Detach File
Event Timeline
Log In to Comment