diff --git a/imports/NeoChat/Panel/RoomDrawer.qml b/imports/NeoChat/Panel/RoomDrawer.qml
index fa0547153..bd3af0ca9 100644
--- a/imports/NeoChat/Panel/RoomDrawer.qml
+++ b/imports/NeoChat/Panel/RoomDrawer.qml
@@ -19,6 +19,7 @@ Kirigami.OverlayDrawer {
readonly property var room: RoomManager.currentRoom
width: modal ? undefined : actualWidth
+
readonly property int minWidth: Kirigami.Units.gridUnit * 15
readonly property int maxWidth: Kirigami.Units.gridUnit * 25
readonly property int defaultWidth: Kirigami.Units.gridUnit * 20
@@ -62,6 +63,10 @@ Kirigami.OverlayDrawer {
edge: Qt.application.layoutDirection == Qt.RightToLeft ? Qt.LeftEdge : Qt.RightEdge
+ // If modal has been changed and the drawer is closed automatically then dim on popup open will have been switched off in main.qml so switch it back on after the animation completes.
+ // This is to avoid dim being active for a split second when the drawer is switched to modal which looks terrible.
+ onAnimatingChanged: if (dim === false) dim = undefined
+
topPadding: 0
leftPadding: 0
rightPadding: 0
diff --git a/imports/NeoChat/Settings/GeneralSettingsPage.qml b/imports/NeoChat/Settings/GeneralSettingsPage.qml
index e2728602a..d0db4619b 100644
--- a/imports/NeoChat/Settings/GeneralSettingsPage.qml
+++ b/imports/NeoChat/Settings/GeneralSettingsPage.qml
@@ -119,6 +119,15 @@ Kirigami.ScrollablePage {
Config.save()
}
}
+ QQC2.CheckBox {
+ text: i18n("Automatically hide/unhide the room information when resizing the window")
+ checked: Config.autoRoomInfoDrawer
+ enabled: !Config.isAutoRoomInfoDrawerImmutable
+ onToggled: {
+ Config.autoRoomInfoDrawer = checked
+ Config.save()
+ }
+ }
}
}
}
diff --git a/qml/main.qml b/qml/main.qml
index 490bcd808..c035f9619 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -148,10 +148,14 @@ Kirigami.ApplicationWindow {
contextDrawer: RoomDrawer {
id: contextDrawer
- edge: Qt.application.layoutDirection == Qt.RightToLeft ? Qt.LeftEdge : Qt.RightEdge
modal: !root.wideScreen || !enabled
onEnabledChanged: drawerOpen = enabled && !modal
- onModalChanged: drawerOpen = !modal
+ onModalChanged: {
+ if (Config.autoRoomInfoDrawer) {
+ drawerOpen = !modal
+ dim = false
+ }
+ }
enabled: RoomManager.hasOpenRoom && pageStack.layers.depth < 2 && pageStack.depth < 3
handleVisible: enabled && pageStack.layers.depth < 2 && pageStack.depth < 3 && (root.wideScreen || pageStack.currentIndex > 0)
}
diff --git a/src/neochatconfig.kcfg b/src/neochatconfig.kcfg
index 1b0fe52a2..2a72dc85e 100644
--- a/src/neochatconfig.kcfg
+++ b/src/neochatconfig.kcfg
@@ -54,6 +54,10 @@
true
+
+
+ true
+