Add desktop dimmer opacity slider

This commit is contained in:
Davide
2025-11-15 13:24:11 +00:00
parent 6da74a800f
commit 996935af2b
14 changed files with 78 additions and 2 deletions
+5
View File
@@ -1680,6 +1680,11 @@
"description": "Den Desktop abdunkeln, wenn Fenster oder Menüs geöffnet sind.",
"label": "Desktop abdunkeln"
},
"dimmer-opacity": {
"description": "Deckkraft für das Abdunkeln des Desktops festlegen.",
"label": "Deckkraft des gedimmten Desktops",
"reset": "Deckkraft des gedimmten Desktops zurücksetzen"
},
"panel-background-opacity": {
"description": "Hintergrunddeckkraft für alle Paneele festlegen (Launcher, Control Center, Einstellungen usw.).",
"label": "Paneel-Hintergrunddeckkraft"
+5
View File
@@ -1680,6 +1680,11 @@
"description": "Dim the desktop when panels or menus are open.",
"label": "Dim desktop"
},
"dimmer-opacity": {
"description": "Set the opacity level for desktop dimming.",
"label": "Dimmed desktop opacity",
"reset": "Reset dimmed desktop opacity"
},
"panel-background-opacity": {
"description": "Set the background opacity for all panels (Launcher, Control Center, Settings, etc.).",
"label": "Panel background opacity"
+5
View File
@@ -1680,6 +1680,11 @@
"description": "Atenuar el escritorio cuando los paneles o menús estén abiertos.",
"label": "Dim escritorio"
},
"dimmer-opacity": {
"description": "Define el nivel de opacidad para el atenuado del escritorio.",
"label": "Opacidad del escritorio atenuado",
"reset": "Restablecer la opacidad del escritorio atenuado"
},
"panel-background-opacity": {
"description": "Establecer la opacidad de fondo para todos los paneles (Launcher, Centro de control, Configuración, etc.).",
"label": "Opacidad de fondo del panel"
+5
View File
@@ -1680,6 +1680,11 @@
"description": "Atténuer le bureau lorsque des panneaux ou des menus sont ouverts.",
"label": "Dim bureau"
},
"dimmer-opacity": {
"description": "Définir le niveau d'opacité pour l'assombrissement du bureau.",
"label": "Opacité du bureau atténué",
"reset": "Réinitialiser l'opacité du bureau atténué"
},
"panel-background-opacity": {
"description": "Définir l'opacité de fond pour tous les panneaux (Lanceur, Centre de contrôle, Paramètres, etc.).",
"label": "Opacité de fond des panneaux"
+5
View File
@@ -1680,6 +1680,11 @@
"description": "Dim de desktop wanneer panelen of menu's geopend zijn.",
"label": "Desktop dimmen"
},
"dimmer-opacity": {
"description": "Stel het opaciteitsniveau in voor het dimmen van het bureaublad.",
"label": "Doorzichtigheid van gedimde desktop",
"reset": "Doorzichtigheid van gedimde desktop resetten"
},
"panel-background-opacity": {
"description": "Stel de achtergronddoorzichtigheid in voor alle panelen (Launcher, Control Center, Instellingen, enz.).",
"label": "Paneel achtergronddoorzichtigheid"
+5
View File
@@ -1680,6 +1680,11 @@
"description": "Escurecer a área de trabalho quando painéis ou menus estiverem abertos.",
"label": "Dim área de trabalho"
},
"dimmer-opacity": {
"description": "Definir o nível de opacidade para o escurecimento da área de trabalho.",
"label": "Opacidade da área de trabalho escurecida",
"reset": "Redefinir opacidade da área de trabalho escurecida"
},
"panel-background-opacity": {
"description": "Definir a opacidade de fundo para todos os painéis (Launcher, Centro de Controle, Configurações, etc.).",
"label": "Opacidade de fundo do painel"
+5
View File
@@ -1680,6 +1680,11 @@
"description": "Затемнять рабочий стол при открытии панелей или меню.",
"label": "Затемнять рабочий стол"
},
"dimmer-opacity": {
"description": "Установить уровень непрозрачности для затемнения рабочего стола.",
"label": "Непрозрачность затемненного рабочего стола",
"reset": "Сбросить непрозрачность затемненного рабочего стола"
},
"panel-background-opacity": {
"description": "Установить прозрачность фона для всех панелей (Launcher, Центр управления, Настройки и т.д.).",
"label": "Прозрачность фона панелей"
+5
View File
@@ -1680,6 +1680,11 @@
"description": "Paneller veya menüler açıkken masaüstünü karart.",
"label": "Masaüstünü karart"
},
"dimmer-opacity": {
"description": "Masaüstü karartması için opaklık seviyesini ayarlayın.",
"label": "Karartılmış masaüstü opaklığı",
"reset": "Karartılmış masaüstü opaklığını sıfırla"
},
"panel-background-opacity": {
"description": "Tüm paneller için arka plan opaklığını ayarlayın (Launcher, Control Center, Ayarlar vb.).",
"label": "Panel arka plan opaklığı"
+5
View File
@@ -1680,6 +1680,11 @@
"description": "Затемнювати робочий стіл, коли відкриті панелі або меню.",
"label": "Приглушити робочий стіл"
},
"dimmer-opacity": {
"description": "Встановити рівень непрозорості для затемнення робочого столу.",
"label": "Непрозорість приглушеного робочого столу",
"reset": "Скинути непрозорість приглушеного робочого столу"
},
"panel-background-opacity": {
"description": "Встановити прозорість фону для всіх панелей (Launcher, Центр керування, Налаштування тощо).",
"label": "Прозорість фону панелей"
+5
View File
@@ -1680,6 +1680,11 @@
"description": "当面板或菜单打开时,桌面变暗。",
"label": "昏暗的桌面"
},
"dimmer-opacity": {
"description": "设置桌面变暗时的不透明度。",
"label": "变暗桌面不透明度",
"reset": "重置变暗桌面不透明度"
},
"panel-background-opacity": {
"description": "设置所有面板的背景不透明度(启动器、控制中心、设置等)。",
"label": "面板背景不透明度"
+3 -1
View File
@@ -60,6 +60,7 @@
"general": {
"avatarImage": "",
"dimDesktop": true,
"dimmerOpacity": 0.8,
"showScreenCorners": false,
"forceBlackScreenCorners": false,
"scaleRatio": 1,
@@ -329,4 +330,5 @@
"battery": {
"chargingMode": 0
}
}
}
+1
View File
@@ -190,6 +190,7 @@ Singleton {
property JsonObject general: JsonObject {
property string avatarImage: ""
property bool dimDesktop: true
property real dimmerOpacity: 0.8
property bool showScreenCorners: false
property bool forceBlackScreenCorners: false
property real scaleRatio: 1.0
+2 -1
View File
@@ -80,12 +80,13 @@ PanelWindow {
// Desktop dimming when panels are open
property bool dimDesktop: Settings.data.general.dimDesktop
property real dimmerOpacity: Settings.data.general.dimmerOpacity ?? 0.8
property bool isPanelOpen: (PanelService.openedPanel !== null) && (PanelService.openedPanel.screen === screen)
property bool isPanelClosing: (PanelService.openedPanel !== null) && PanelService.openedPanel.isClosing
color: {
if (dimDesktop && isPanelOpen) {
return Qt.alpha(Color.mShadow, 0.8)
return Qt.alpha(Color.mShadow, dimmerOpacity)
}
return Color.transparent
}
@@ -32,6 +32,28 @@ ColumnLayout {
onToggled: checked => Settings.data.general.dimDesktop = checked
}
// when dimDesktop is enabled: dimmer opacity
ColumnLayout {
visible: Settings.data.general.dimDesktop
spacing: Style.marginXXS
Layout.fillWidth: true
NLabel {
label: I18n.tr("settings.user-interface.dimmer-opacity.label")
description: I18n.tr("settings.user-interface.dimmer-opacity.description")
}
NValueSlider {
Layout.fillWidth: true
from: 0
to: 1
stepSize: 0.01
value: Settings.data.general.dimmerOpacity
onMoved: value => Settings.data.general.dimmerOpacity = value
text: Math.floor(Settings.data.general.dimmerOpacity * 100) + "%"
}
}
NToggle {
label: I18n.tr("settings.user-interface.panels-attached-to-bar.label")
description: I18n.tr("settings.user-interface.panels-attached-to-bar.description")