From d9e0f2fc1091e0c35b377da4d3910962623a6c01 Mon Sep 17 00:00:00 2001 From: Adam Laughlin Date: Fri, 21 Nov 2025 07:45:37 -0500 Subject: [PATCH] Dock: make border radius configurable --- Assets/Translations/en.json | 4 ++++ Commons/Settings.qml | 1 + Modules/Dock/Dock.qml | 2 +- Modules/Panels/Settings/Tabs/DockTab.qml | 19 +++++++++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index c4b6a4124..a1ff22005 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1216,6 +1216,10 @@ "description": "Adjust the dock's background opacity.", "label": "Background opacity" }, + "border-radius": { + "description": "Adjust the dock's border radius.", + "label": "Border radius" + }, "colorize-icons": { "description": "Apply theme colors to dock app icons (non-focused apps only).", "label": "Colorize Icons" diff --git a/Commons/Settings.qml b/Commons/Settings.qml index fd5973884..b1f76aba5 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -385,6 +385,7 @@ Singleton { property bool enabled: true property string displayMode: "always_visible" // "always_visible", "auto_hide", "exclusive" property real backgroundOpacity: 1.0 + property real radiusRatio: 0.1 property real floatingRatio: 1.0 property real size: 1 property bool onlySameOutput: true diff --git a/Modules/Dock/Dock.qml b/Modules/Dock/Dock.qml index e68ed433f..e787369d7 100644 --- a/Modules/Dock/Dock.qml +++ b/Modules/Dock/Dock.qml @@ -299,7 +299,7 @@ Loader { height: Math.round(iconSize * 1.5) color: Qt.alpha(Color.mSurface, Settings.data.dock.backgroundOpacity) anchors.centerIn: parent - radius: Style.radiusL + radius: height * 0.5 * Settings.data.dock.radiusRatio border.width: Style.borderS border.color: Qt.alpha(Color.mOutline, Settings.data.dock.backgroundOpacity) diff --git a/Modules/Panels/Settings/Tabs/DockTab.qml b/Modules/Panels/Settings/Tabs/DockTab.qml index 5ca75804d..5e88fa300 100644 --- a/Modules/Panels/Settings/Tabs/DockTab.qml +++ b/Modules/Panels/Settings/Tabs/DockTab.qml @@ -81,6 +81,25 @@ ColumnLayout { } } + ColumnLayout { + visible: Settings.data.dock.enabled + spacing: Style.marginXXS + Layout.fillWidth: true + NLabel { + label: I18n.tr("settings.dock.appearance.border-radius.label") + description: I18n.tr("settings.dock.appearance.border-radius.description") + } + NValueSlider { + Layout.fillWidth: true + from: 0 + to: 1 + stepSize: 0.01 + value: Settings.data.dock.radiusRatio + onMoved: value => Settings.data.dock.radiusRatio = value + text: Math.floor(Settings.data.dock.radiusRatio * 100) + "%" + } + } + ColumnLayout { visible: Settings.data.dock.enabled spacing: Style.marginXXS