add a separate configuration item for edge of screen

This commit is contained in:
Juve 2025-09-11 10:11:01 +08:00
parent 4afe2d8448
commit f0733f19dd
4 changed files with 40 additions and 7 deletions

View file

@ -317,6 +317,7 @@ Singleton {
property bool dimDesktop: false
property bool showScreenCorners: false
property real radiusRatio: 1.0
property real screenRadiusRatio: 1.0
// Animation speed multiplier (0.1x - 2.0x)
property real animationSpeed: 1.0
}

View file

@ -35,6 +35,9 @@ Singleton {
property int radiusM: 16 * Settings.data.general.radiusRatio
property int radiusL: 20 * Settings.data.general.radiusRatio
//screen Radii
property int screenRadius: 20 * Settings.data.general.screenRadiusRatio
// Border
property int borderS: 1
property int borderM: 2

View file

@ -20,8 +20,8 @@ Loader {
screen: modelData
property color cornerColor: Qt.alpha(Color.mSurface, Settings.data.bar.backgroundOpacity)
property real cornerRadius: Style.radiusL * scaling
property real cornerSize: Style.radiusL * scaling
property real cornerRadius: Style.screenRadius * scaling
property real cornerSize: Style.screenRadius * scaling
Connections {
target: ScalingService

View file

@ -56,6 +56,13 @@ ColumnLayout {
Layout.bottomMargin: Style.marginS * scaling
}
NToggle {
label: "Dim Desktop"
description: "Dim the desktop when panels or menus are open."
checked: Settings.data.general.dimDesktop
onToggled: checked => Settings.data.general.dimDesktop = checked
}
NToggle {
label: "Show Corners"
description: "Display rounded corners on the edge of the screen."
@ -63,11 +70,33 @@ ColumnLayout {
onToggled: checked => Settings.data.general.showScreenCorners = checked
}
NToggle {
label: "Dim Desktop"
description: "Dim the desktop when panels or menus are open."
checked: Settings.data.general.dimDesktop
onToggled: checked => Settings.data.general.dimDesktop = checked
ColumnLayout {
spacing: Style.marginXXS * scaling
Layout.fillWidth: true
NLabel {
label: "Screen edge radius"
description: "Adjust the rounded corners of the screen."
}
RowLayout {
NSlider {
Layout.fillWidth: true
from: 0
to: 1
stepSize: 0.01
value: Settings.data.general.screenRadiusRatio
onMoved: Settings.data.general.screenRadiusRatio = value
cutoutColor: Color.mSurface
}
NText {
text: Math.floor(Settings.data.general.screenRadiusRatio * 100) + "%"
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: Style.marginS * scaling
color: Color.mOnSurface
}
}
}
ColumnLayout {