mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Dock: replace visibility toggles with NCombobox (to avoid unwanted
behaviour)
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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": "背景不透明度",
|
||||
|
||||
@@ -115,8 +115,7 @@
|
||||
"position": "close_to_bar_button"
|
||||
},
|
||||
"dock": {
|
||||
"autoHide": false,
|
||||
"exclusive": false,
|
||||
"displayMode": "always_visible",
|
||||
"backgroundOpacity": 1,
|
||||
"floatingRatio": 1,
|
||||
"onlySameOutput": true,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user