Page MenuHomePhorge

D53.1732389144.diff
No OneTemporary

Size
5 KB
Referenced Files
None
Subscribers
None

D53.1732389144.diff

diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
/src/contents/ui/AvatarAdapter.qml
/src/contents/ui/FileDialogAdapter.qml
/src/contents/ui/FolderDialogAdapter.qml
+/src/contents/ui/ScrollablePageAdapter.qml
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -18,6 +18,7 @@
configure_file(${kazv_avatarAdapterFile} ${CMAKE_CURRENT_SOURCE_DIR}/contents/ui/AvatarAdapter.qml COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contents/ui/FileDialogAdapter_Qt${QT_MAJOR_VERSION}.qml ${CMAKE_CURRENT_SOURCE_DIR}/contents/ui/FileDialogAdapter.qml COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contents/ui/FolderDialogAdapter_Qt${QT_MAJOR_VERSION}.qml ${CMAKE_CURRENT_SOURCE_DIR}/contents/ui/FolderDialogAdapter.qml COPYONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contents/ui/ScrollablePageAdapter_KF${KF_MAJOR_VERSION}.qml ${CMAKE_CURRENT_SOURCE_DIR}/contents/ui/ScrollablePageAdapter.qml COPYONLY)
set(kazvprivlib_SRCS
qt-job-handler.cpp
diff --git a/src/contents/ui/ClosableScrollablePage.qml b/src/contents/ui/ClosableScrollablePage.qml
--- a/src/contents/ui/ClosableScrollablePage.qml
+++ b/src/contents/ui/ClosableScrollablePage.qml
@@ -12,7 +12,7 @@
import '.' as Kazv
-Kirigami.ScrollablePage {
+Kazv.ScrollablePageAdapter {
onBackRequested: (event) => {
event.accepted = true;
applicationWindow().pageStack.pop();
diff --git a/src/contents/ui/RoomPage.qml b/src/contents/ui/RoomPage.qml
--- a/src/contents/ui/RoomPage.qml
+++ b/src/contents/ui/RoomPage.qml
@@ -15,7 +15,7 @@
import '.' as Kazv
import 'matrix-helpers.js' as Helpers
-Kirigami.ScrollablePage {
+Kazv.ScrollablePageAdapter {
id: roomPage
property string roomId: ''
property var room: sdkVars.roomList.room(roomId)
@@ -33,23 +33,21 @@
property var isInvite: room.membership === MK.MatrixRoom.Invite
property var isJoin: room.membership === MK.MatrixRoom.Join
- actions.main: Kirigami.Action {
- id: acceptInviteAction
- icon.name: 'checkmark'
- text: l10n.get('room-invite-accept-action')
- visible: isInvite
- onTriggered: joinRoomHandler.call()
- }
-
- actions.left: Kirigami.Action {
- id: rejectInviteAction
- icon.name: 'im-ban-kick-user'
- text: l10n.get('room-invite-reject-action')
- visible: isInvite
- onTriggered: leaveRoomHandler.call()
- }
-
- actions.contextualActions: [
+ contextualActions: [
+ Kirigami.Action {
+ id: acceptInviteAction
+ icon.name: 'checkmark'
+ text: l10n.get('room-invite-accept-action')
+ visible: isInvite
+ onTriggered: joinRoomHandler.call()
+ },
+ Kirigami.Action {
+ id: rejectInviteAction
+ icon.name: 'im-ban-kick-user'
+ text: l10n.get('room-invite-reject-action')
+ visible: isInvite
+ onTriggered: leaveRoomHandler.call()
+ },
Kirigami.Action {
id: roomSettingsAction
icon.name: 'settings-configure'
diff --git a/src/contents/ui/ClosableScrollablePage.qml b/src/contents/ui/ScrollablePageAdapter_KF5.qml
copy from src/contents/ui/ClosableScrollablePage.qml
copy to src/contents/ui/ScrollablePageAdapter_KF5.qml
--- a/src/contents/ui/ClosableScrollablePage.qml
+++ b/src/contents/ui/ScrollablePageAdapter_KF5.qml
@@ -4,17 +4,8 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-import QtQuick 2.2
-import QtQuick.Layouts 1.15
-import QtQuick.Controls 2.15
-
+import QtQuick 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/ClosableScrollablePage.qml b/src/contents/ui/ScrollablePageAdapter_KF6.qml
copy from src/contents/ui/ClosableScrollablePage.qml
copy to src/contents/ui/ScrollablePageAdapter_KF6.qml
--- a/src/contents/ui/ClosableScrollablePage.qml
+++ b/src/contents/ui/ScrollablePageAdapter_KF6.qml
@@ -4,17 +4,10 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-import QtQuick 2.2
-import QtQuick.Layouts 1.15
-import QtQuick.Controls 2.15
-
+import QtQuick 2.15
import org.kde.kirigami 2.13 as Kirigami
-import '.' as Kazv
-
Kirigami.ScrollablePage {
- onBackRequested: (event) => {
- event.accepted = true;
- applicationWindow().pageStack.pop();
- }
+ id: scrollablePage
+ property alias contextualActions: scrollablePage.actions
}
diff --git a/src/resources.qrc b/src/resources.qrc
--- a/src/resources.qrc
+++ b/src/resources.qrc
@@ -79,6 +79,7 @@
<file alias="AvatarAdapter.qml">contents/ui/AvatarAdapter.qml</file>
<file alias="FileDialogAdapter.qml">contents/ui/FileDialogAdapter.qml</file>
<file alias="FolderDialogAdapter.qml">contents/ui/FolderDialogAdapter.qml</file>
+ <file alias="ScrollablePageAdapter.qml">contents/ui/ScrollablePageAdapter.qml</file>
<file alias="l10n.js">js/l10n.js</file>
<file alias="fluent-bundle.js">js/transformed-libs/fluent-bundle.js</file>
<file alias="fluent-sequence.js">js/transformed-libs/fluent-sequence.js</file>

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 11:12 AM (14 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39358
Default Alt Text
D53.1732389144.diff (5 KB)

Event Timeline