diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 03a864c7..af6f25b7 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -276,13 +276,12 @@ "label": "Erscheinungsbild", "description": "Verhalten und Erscheinungsbild des Docks anpassen." }, - "auto-hide": { - "label": "Automatisch ausblenden", - "description": "Automatisch ausblenden, wenn nicht in Gebrauch." - }, - "exclusive-zone": { - "label": "Exklusive Zone", - "description": "Fensterüberlappung verhindern." + "display": { + "label": "Anzeige", + "description": "Wählen Sie, wie sich das Dock verhält.", + "always-visible": "Immer sichtbar", + "auto-hide": "Automatisch ausblenden", + "exclusive": "Exklusiv" }, "background-opacity": { "label": "Hintergrund-Transparenz", diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 9f51a7ec..d939ba82 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -274,13 +274,12 @@ "label": "Appearance", "description": "Customize the dock's behavior and appearance." }, - "auto-hide": { - "label": "Auto-hide", - "description": "Automatically hide when not in use." - }, - "exclusive-zone": { - "label": "Exclusive zone", - "description": "Prevent window overlap." + "display": { + "label": "Display", + "description": "Choose how the dock behaves.", + "always-visible": "Always visible", + "auto-hide": "Auto hide", + "exclusive": "Exclusive" }, "background-opacity": { "label": "Background opacity", diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index ba54afa3..b31971ed 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -272,13 +272,12 @@ "label": "Apariencia", "description": "Personaliza el comportamiento y la apariencia del dock." }, - "auto-hide": { - "label": "Ocultar automáticamente", - "description": "Ocultar automáticamente cuando no está en uso." - }, - "exclusive-zone": { - "label": "Zona exclusiva", - "description": "Evita la superposición de ventanas." + "display": { + "label": "Pantalla", + "description": "Elige cómo se comporta el dock.", + "always-visible": "Siempre visible", + "auto-hide": "Ocultar automáticamente", + "exclusive": "Exclusivo" }, "background-opacity": { "label": "Opacidad del fondo", diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 15e4ca87..27f6bed4 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -272,13 +272,12 @@ "label": "Apparence", "description": "Personnalisez le comportement et l'apparence du dock." }, - "auto-hide": { - "label": "Masquer automatiquement", - "description": "Masquer automatiquement lorsqu'il n'est pas utilisé." - }, - "exclusive-zone": { - "label": "Zone exclusive", - "description": "Empêcher le chevauchement des fenêtres." + "display": { + "label": "Affichage", + "description": "Choisissez comment le dock se comporte.", + "always-visible": "Toujours visible", + "auto-hide": "Masquer automatiquement", + "exclusive": "Exclusif" }, "background-opacity": { "label": "Opacité de l'arrière-plan", diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index 8187d47d..f7bfa04c 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -272,13 +272,12 @@ "label": "Aparência", "description": "Personalize o comportamento e a aparência da dock." }, - "auto-hide": { - "label": "Ocultar automaticamente", - "description": "Oculta automaticamente quando não está em uso." - }, - "exclusive-zone": { - "label": "Zona exclusiva", - "description": "Impede a sobreposição de janelas." + "display": { + "label": "Exibição", + "description": "Escolha como a dock se comporta.", + "always-visible": "Sempre visível", + "auto-hide": "Ocultar automaticamente", + "exclusive": "Exclusivo" }, "background-opacity": { "label": "Opacidade do fundo", diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index e66bc8bb..594794d2 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -272,13 +272,12 @@ "label": "外观", "description": "自定义 Dock 的行为和外观。" }, - "auto-hide": { - "label": "自动隐藏", - "description": "不使用时自动隐藏。" - }, - "exclusive-zone": { - "label": "独占区域", - "description": "可以防止窗口重叠。" + "display": { + "label": "显示", + "description": "选择 Dock 的行为方式。", + "always-visible": "始终可见", + "auto-hide": "自动隐藏", + "exclusive": "独占" }, "background-opacity": { "label": "背景不透明度", diff --git a/Assets/settings-default.json b/Assets/settings-default.json index ba8a98c7..91fcf206 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -115,8 +115,7 @@ "position": "close_to_bar_button" }, "dock": { - "autoHide": false, - "exclusive": false, + "displayMode": "always_visible", "backgroundOpacity": 1, "floatingRatio": 1, "onlySameOutput": true, diff --git a/Commons/Settings.qml b/Commons/Settings.qml index a75685bf..59ed5465 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -250,8 +250,7 @@ Singleton { // dock property JsonObject dock: JsonObject { - property bool autoHide: false - property bool exclusive: false + property string displayMode: "always_visible" // "always_visible", "auto_hide", "exclusive" property real backgroundOpacity: 1.0 property real floatingRatio: 1.0 property bool onlySameOutput: true diff --git a/Modules/Dock/Dock.qml b/Modules/Dock/Dock.qml index 53fd7142..d99fdd5e 100644 --- a/Modules/Dock/Dock.qml +++ b/Modules/Dock/Dock.qml @@ -64,7 +64,9 @@ Variants { } // Shared properties between peek and dock windows - readonly property bool autoHide: Settings.data.dock.autoHide + readonly property string displayMode: Settings.data.dock.displayMode + readonly property bool autoHide: displayMode === "auto_hide" + readonly property bool exclusive: displayMode === "exclusive" readonly property int hideDelay: 500 readonly property int showDelay: 100 readonly property int hideAnimationDuration: Style.animationFast @@ -250,7 +252,7 @@ Variants { color: Color.transparent WlrLayershell.namespace: "noctalia-dock-main" - WlrLayershell.exclusionMode: Settings.data.dock.exclusive ? ExclusionMode.Auto : ExclusionMode.Ignore + WlrLayershell.exclusionMode: exclusive ? ExclusionMode.Auto : ExclusionMode.Ignore // Size to fit the dock container exactly implicitWidth: dockContainerWrapper.width diff --git a/Modules/Settings/Tabs/DockTab.qml b/Modules/Settings/Tabs/DockTab.qml index b13e69f5..60ad8a9f 100644 --- a/Modules/Settings/Tabs/DockTab.qml +++ b/Modules/Settings/Tabs/DockTab.qml @@ -29,18 +29,30 @@ ColumnLayout { description: I18n.tr("settings.dock.appearance.section.description") } - NToggle { - label: I18n.tr("settings.dock.appearance.auto-hide.label") - description: I18n.tr("settings.dock.appearance.auto-hide.description") - checked: Settings.data.dock.autoHide - onToggled: checked => Settings.data.dock.autoHide = checked - } - - NToggle { - label: I18n.tr("settings.dock.appearance.exclusive-zone.label") - description: I18n.tr("settings.dock.appearance.exclusive-zone.description") - checked: Settings.data.dock.exclusive - onToggled: checked => Settings.data.dock.exclusive = checked + ColumnLayout { + spacing: Style.marginXXS * scaling + Layout.fillWidth: true + NLabel { + label: I18n.tr("settings.dock.appearance.display.label") + description: I18n.tr("settings.dock.appearance.display.description") + } + NComboBox { + Layout.fillWidth: true + model: [{ + "key": "always_visible", + "name": I18n.tr("settings.dock.appearance.display.always-visible") + }, { + "key": "auto_hide", + "name": I18n.tr("settings.dock.appearance.display.auto-hide") + }, { + "key": "exclusive", + "name": I18n.tr("settings.dock.appearance.display.exclusive") + }] + currentKey: Settings.data.dock.displayMode + onSelected: key => { + Settings.data.dock.displayMode = key + } + } } ColumnLayout {