12
qml/main.qml
12
qml/main.qml
@@ -18,7 +18,11 @@ import NeoChat.Page 1.0
|
|||||||
|
|
||||||
Kirigami.ApplicationWindow {
|
Kirigami.ApplicationWindow {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property var currentRoom: null
|
property var currentRoom: null
|
||||||
|
property int columnWidth: Kirigami.Units.gridUnit * 13
|
||||||
|
|
||||||
|
wideScreen: width > columnWidth * 5
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: root.quitAction
|
target: root.quitAction
|
||||||
@@ -113,14 +117,20 @@ Kirigami.ApplicationWindow {
|
|||||||
|
|
||||||
contextDrawer: RoomDrawer {
|
contextDrawer: RoomDrawer {
|
||||||
id: contextDrawer
|
id: contextDrawer
|
||||||
|
contentItem.implicitWidth: columnWidth
|
||||||
|
edge: Qt.application.layoutDirection == Qt.RightToLeft ? Qt.LeftEdge : Qt.RightEdge
|
||||||
|
modal: !root.wideScreen
|
||||||
|
onEnabledChanged: drawerOpen = enabled && !modal
|
||||||
|
onModalChanged: drawerOpen = !modal
|
||||||
enabled: roomManager.hasOpenRoom
|
enabled: roomManager.hasOpenRoom
|
||||||
room: roomManager.currentRoom
|
room: roomManager.currentRoom
|
||||||
handleVisible: enabled && pageStack.layers.depth < 2
|
handleVisible: enabled && pageStack.layers.depth < 2
|
||||||
}
|
}
|
||||||
|
|
||||||
globalDrawer: Kirigami.GlobalDrawer {
|
globalDrawer: Kirigami.GlobalDrawer {
|
||||||
isMenu: true
|
|
||||||
property bool hasLayer
|
property bool hasLayer
|
||||||
|
contentItem.implicitWidth: columnWidth
|
||||||
|
isMenu: true
|
||||||
actions: [
|
actions: [
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18n("Explore rooms")
|
text: i18n("Explore rooms")
|
||||||
|
|||||||
Reference in New Issue
Block a user