diff --git a/src/backend/user_files.py b/src/backend/user_files.py index fe3a6332..c0cc7a57 100644 --- a/src/backend/user_files.py +++ b/src/backend/user_files.py @@ -208,7 +208,7 @@ class UISettings(JSONDataFile): return { "alertOnMessageForMsec": 4000, "alwaysCenterRoomHeader": False, - "compactModeByDefault": False, + "compactMode": True, "clearRoomFilterOnEnter": True, "clearRoomFilterOnEscape": True, "collapseSidePanesUnderWindowWidth": 400, @@ -229,9 +229,10 @@ class UISettings(JSONDataFile): "toggleDebugConsole": ["Alt+Shift+C", "F1"], "reloadConfig": ["Alt+Shift+R"], - "zoomIn": ["Ctrl++"], - "zoomOut": ["Ctrl+-"], - "zoomReset": ["Ctrl+="], + "zoomIn": ["Ctrl++"], + "zoomOut": ["Ctrl+-"], + "zoomReset": ["Ctrl+="], + "toggleCompactMode": ["Ctrl+Alt+C"], "scrollUp": ["Alt+Up", "Alt+K"], "scrollDown": ["Alt+Down", "Alt+J"], diff --git a/src/gui/Base/HTile.qml b/src/gui/Base/HTile.qml index 1cc67b37..df2ad60f 100644 --- a/src/gui/Base/HTile.qml +++ b/src/gui/Base/HTile.qml @@ -11,7 +11,7 @@ HButton { default property alias additionalData: contentItem.data - property bool compact: window.settings.compactModeByDefault + property bool compact: window.settings.compactMode property real contentOpacity: 1 readonly property alias title: title diff --git a/src/gui/GlobalShortcuts.qml b/src/gui/GlobalShortcuts.qml index aed1f551..98c86426 100644 --- a/src/gui/GlobalShortcuts.qml +++ b/src/gui/GlobalShortcuts.qml @@ -78,6 +78,14 @@ Item { onActivated: theme.uiScale = 1 } + HShortcut { + sequences: settings.keys.toggleCompactMode + onActivated: { + settings.compactMode = ! settings.compactMode + settingsChanged() + } + } + // Pages HShortcut { diff --git a/src/gui/Pages/Chat/Timeline/EventDelegate.qml b/src/gui/Pages/Chat/Timeline/EventDelegate.qml index 9176ab6e..c0683fed 100644 --- a/src/gui/Pages/Chat/Timeline/EventDelegate.qml +++ b/src/gui/Pages/Chat/Timeline/EventDelegate.qml @@ -20,7 +20,7 @@ HColumnLayout { readonly property var nextModel: eventList.model.get(model.index - 1) readonly property QtObject currentModel: model - property bool compact: window.settings.compactModeByDefault + property bool compact: window.settings.compactMode property bool isOwn: chat.userId === model.sender_id property bool onRight: eventList.ownEventsOnRight && isOwn property bool combine: eventList.canCombine(previousModel, model)