From 5392016dabcee70bad35e14495e6e96d92060000 Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 17 Mar 2020 15:37:55 -0400 Subject: [PATCH] Add setting controlling when panes should collapse --- src/backend/user_files.py | 1 + src/gui/Base/HDrawer.qml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/user_files.py b/src/backend/user_files.py index dbe332fb..1d6d6cdc 100644 --- a/src/backend/user_files.py +++ b/src/backend/user_files.py @@ -196,6 +196,7 @@ class UISettings(JSONDataFile): "alertOnMessageForMsec": 4000, "clearRoomFilterOnEnter": True, "clearRoomFilterOnEscape": True, + "collapseSidePanesUnderWindowWidth": 400, "theme": "Midnight.qpl", "writeAliases": {}, "media": { diff --git a/src/gui/Base/HDrawer.qml b/src/gui/Base/HDrawer.qml index 2049c882..1e48121f 100644 --- a/src/gui/Base/HDrawer.qml +++ b/src/gui/Base/HDrawer.qml @@ -54,7 +54,8 @@ Drawer { property Item referenceSizeParent: parent property bool collapse: - (horizontal ? window.width : window.height) < 400 * theme.uiScale + (horizontal ? window.width : window.height) < + window.settings.collapseSidePanesUnderWindowWidth * theme.uiScale property int peekSizeWhileCollapsed: horizontal ? referenceSizeParent.width : referenceSizeParent.height