Settings: Added a ScreenCorners section in the general tab.
This commit is contained in:
parent
4afb98cf4c
commit
626b745ce3
2 changed files with 56 additions and 37 deletions
|
|
@ -21,7 +21,7 @@ Loader {
|
||||||
|
|
||||||
property color cornerColor: Qt.alpha(Color.mSurface, Settings.data.bar.backgroundOpacity)
|
property color cornerColor: Qt.alpha(Color.mSurface, Settings.data.bar.backgroundOpacity)
|
||||||
property real cornerRadius: Style.screenRadius * scaling
|
property real cornerRadius: Style.screenRadius * scaling
|
||||||
property real cornerSize: Style.screenRadius * scaling
|
property real cornerSize: Style.screenRadius * scaling
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: ScalingService
|
target: ScalingService
|
||||||
|
|
|
||||||
|
|
@ -63,42 +63,6 @@ ColumnLayout {
|
||||||
onToggled: checked => Settings.data.general.dimDesktop = checked
|
onToggled: checked => Settings.data.general.dimDesktop = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
NToggle {
|
|
||||||
label: "Show Corners"
|
|
||||||
description: "Display rounded corners on the edge of the screen."
|
|
||||||
checked: Settings.data.general.showScreenCorners
|
|
||||||
onToggled: checked => Settings.data.general.showScreenCorners = 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 {
|
ColumnLayout {
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: Style.marginXXS * scaling
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -158,6 +122,61 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NDivider {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: Style.marginXL * scaling
|
||||||
|
Layout.bottomMargin: Style.marginXL * scaling
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dock
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: Style.marginL * scaling
|
||||||
|
Layout.fillWidth: true
|
||||||
|
NText {
|
||||||
|
text: "Screen Corners"
|
||||||
|
font.pointSize: Style.fontSizeXXL * scaling
|
||||||
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Color.mSecondary
|
||||||
|
Layout.bottomMargin: Style.marginS * scaling
|
||||||
|
}
|
||||||
|
|
||||||
|
NToggle {
|
||||||
|
label: "Show Screen Corners"
|
||||||
|
description: "Display rounded corners on the edge of the screen."
|
||||||
|
checked: Settings.data.general.showScreenCorners
|
||||||
|
onToggled: checked => Settings.data.general.showScreenCorners = checked
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: Style.marginXXS * scaling
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
NLabel {
|
||||||
|
label: "Screen Corners Radius"
|
||||||
|
description: "Adjust the rounded corners of the screen."
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
NSlider {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
from: 0
|
||||||
|
to: 2
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Style.marginXL * scaling
|
Layout.topMargin: Style.marginXL * scaling
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue