mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-05 22:26:16 +00:00
Dock: make border radius configurable
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user