committed by
Tobias Fella
parent
924a1fed21
commit
67bc66ee0c
@@ -26,6 +26,10 @@ Kirigami.ScrollablePage {
|
|||||||
/// Used to determine if scrolling to the bottom should mark the message as unread
|
/// Used to determine if scrolling to the bottom should mark the message as unread
|
||||||
property bool hasScrolledUpBefore: false;
|
property bool hasScrolledUpBefore: false;
|
||||||
|
|
||||||
|
/// Disable cancel shortcut. Used by the seperate window since it provide its own
|
||||||
|
/// cancel implementation.
|
||||||
|
property bool disableCancelShortcut: false
|
||||||
|
|
||||||
title: currentRoom.htmlSafeDisplayName
|
title: currentRoom.htmlSafeDisplayName
|
||||||
|
|
||||||
KeyNavigation.left: pageStack.get(0)
|
KeyNavigation.left: pageStack.get(0)
|
||||||
@@ -55,6 +59,12 @@ Kirigami.ScrollablePage {
|
|||||||
connection: Controller.activeConnection
|
connection: Controller.activeConnection
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Shortcut {
|
||||||
|
sequence: StandardKey.Cancel
|
||||||
|
onActivated: applicationWindow().pageStack.get(0).forceActiveFocus()
|
||||||
|
enabled: !page.disableCancelShortcut
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Controller.activeConnection
|
target: Controller.activeConnection
|
||||||
function onJoinedRoom(room, invited) {
|
function onJoinedRoom(room, invited) {
|
||||||
|
|||||||
@@ -12,8 +12,14 @@ Kirigami.ApplicationWindow {
|
|||||||
required property var currentRoom
|
required property var currentRoom
|
||||||
minimumWidth: Kirigami.Units.gridUnit * 10
|
minimumWidth: Kirigami.Units.gridUnit * 10
|
||||||
minimumHeight: Kirigami.Units.gridUnit * 15
|
minimumHeight: Kirigami.Units.gridUnit * 15
|
||||||
|
|
||||||
|
Shortcut {
|
||||||
|
sequence: StandardKey.Cancel
|
||||||
|
onActivated: window.close()
|
||||||
|
}
|
||||||
pageStack.initialPage: RoomPage {
|
pageStack.initialPage: RoomPage {
|
||||||
visible: true
|
visible: true
|
||||||
currentRoom: window.currentRoom
|
currentRoom: window.currentRoom
|
||||||
|
disableCancelShortcut: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user