feat: Add adjustable dock size setting

This commit is contained in:
loner
2025-10-18 21:54:41 +08:00
parent 94f247eefc
commit e564ec2a7c
5 changed files with 27 additions and 3 deletions
+5 -1
View File
@@ -269,7 +269,11 @@
},
"floating-distance": {
"label": "Dock floating distance",
"description": "Adjust the floating distance from the screen edge."
"description": "Set the distance between the dock and the edge of the screen."
},
"icon-size": {
"label": "Dock size",
"description": "Adjust the overall size of the dock."
},
"colorize-icons": {
"label": "Colorize Icons",
+2 -1
View File
@@ -172,7 +172,8 @@
"onlySameOutput": true,
"monitors": [],
"pinnedApps": [],
"colorizeIcons": false
"colorizeIcons": false,
"size": 1
},
"network": {
"wifiEnabled": true
+1
View File
@@ -293,6 +293,7 @@ Singleton {
property string displayMode: "always_visible" // "always_visible", "auto_hide", "exclusive"
property real backgroundOpacity: 1.0
property real floatingRatio: 1.0
property real size: 1
property bool onlySameOutput: true
property list<string> monitors: []
// Desktop entry IDs pinned to the dock (e.g., "org.kde.konsole", "firefox.desktop")
+1 -1
View File
@@ -63,7 +63,7 @@ Variants {
readonly property int hideAnimationDuration: Style.animationFast
readonly property int showAnimationDuration: Style.animationFast
readonly property int peekHeight: 1
readonly property int iconSize: 36
readonly property int iconSize: Math.round(12 + 24 * (Settings.data.dock.size ?? 1))
readonly property int floatingMargin: Settings.data.dock.floatingRatio * Style.marginL
// Bar detection and positioning properties
+18
View File
@@ -87,6 +87,24 @@ ColumnLayout {
}
}
ColumnLayout {
spacing: Style.marginXXS
Layout.fillWidth: true
NLabel {
label: I18n.tr("settings.dock.appearance.icon-size.label")
description: I18n.tr("settings.dock.appearance.icon-size.description")
}
NValueSlider {
Layout.fillWidth: true
from: 0
to: 2
stepSize: 0.01
value: Settings.data.dock.size
onMoved: value => Settings.data.dock.size = value
text: Math.floor(Settings.data.dock.size * 100) + "%"
}
}
NToggle {
label: I18n.tr("settings.dock.monitors.only-same-output.label")
description: I18n.tr("settings.dock.monitors.only-same-output.description")