Add setting controlling when panes should collapse

This commit is contained in:
miruka 2020-03-17 15:37:55 -04:00
parent 84734599e3
commit 5392016dab
2 changed files with 3 additions and 1 deletions

View File

@ -196,6 +196,7 @@ class UISettings(JSONDataFile):
"alertOnMessageForMsec": 4000, "alertOnMessageForMsec": 4000,
"clearRoomFilterOnEnter": True, "clearRoomFilterOnEnter": True,
"clearRoomFilterOnEscape": True, "clearRoomFilterOnEscape": True,
"collapseSidePanesUnderWindowWidth": 400,
"theme": "Midnight.qpl", "theme": "Midnight.qpl",
"writeAliases": {}, "writeAliases": {},
"media": { "media": {

View File

@ -54,7 +54,8 @@ Drawer {
property Item referenceSizeParent: parent property Item referenceSizeParent: parent
property bool collapse: property bool collapse:
(horizontal ? window.width : window.height) < 400 * theme.uiScale (horizontal ? window.width : window.height) <
window.settings.collapseSidePanesUnderWindowWidth * theme.uiScale
property int peekSizeWhileCollapsed: property int peekSizeWhileCollapsed:
horizontal ? referenceSizeParent.width : referenceSizeParent.height horizontal ? referenceSizeParent.width : referenceSizeParent.height