Merge pull request #244 from juvevood/screen-corners-radius
Screen Corners use general radius ratio of settings
This commit is contained in:
commit
4afb98cf4c
4 changed files with 40 additions and 7 deletions
|
|
@ -323,6 +323,7 @@ Singleton {
|
||||||
property bool dimDesktop: false
|
property bool dimDesktop: false
|
||||||
property bool showScreenCorners: false
|
property bool showScreenCorners: false
|
||||||
property real radiusRatio: 1.0
|
property real radiusRatio: 1.0
|
||||||
|
property real screenRadiusRatio: 1.0
|
||||||
// Animation speed multiplier (0.1x - 2.0x)
|
// Animation speed multiplier (0.1x - 2.0x)
|
||||||
property real animationSpeed: 1.0
|
property real animationSpeed: 1.0
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,9 @@ Singleton {
|
||||||
property int radiusM: 16 * Settings.data.general.radiusRatio
|
property int radiusM: 16 * Settings.data.general.radiusRatio
|
||||||
property int radiusL: 20 * Settings.data.general.radiusRatio
|
property int radiusL: 20 * Settings.data.general.radiusRatio
|
||||||
|
|
||||||
|
//screen Radii
|
||||||
|
property int screenRadius: 20 * Settings.data.general.screenRadiusRatio
|
||||||
|
|
||||||
// Border
|
// Border
|
||||||
property int borderS: 1
|
property int borderS: 1
|
||||||
property int borderM: 2
|
property int borderM: 2
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ Loader {
|
||||||
screen: modelData
|
screen: modelData
|
||||||
|
|
||||||
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: 20 * scaling
|
property real cornerRadius: Style.screenRadius * scaling
|
||||||
property real cornerSize: 20 * scaling
|
property real cornerSize: Style.screenRadius * scaling
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: ScalingService
|
target: ScalingService
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,13 @@ ColumnLayout {
|
||||||
Layout.bottomMargin: Style.marginS * scaling
|
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 {
|
NToggle {
|
||||||
label: "Show Corners"
|
label: "Show Corners"
|
||||||
description: "Display rounded corners on the edge of the screen."
|
description: "Display rounded corners on the edge of the screen."
|
||||||
|
|
@ -63,11 +70,33 @@ ColumnLayout {
|
||||||
onToggled: checked => Settings.data.general.showScreenCorners = checked
|
onToggled: checked => Settings.data.general.showScreenCorners = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
NToggle {
|
ColumnLayout {
|
||||||
label: "Dim Desktop"
|
spacing: Style.marginXXS * scaling
|
||||||
description: "Dim the desktop when panels or menus are open."
|
Layout.fillWidth: true
|
||||||
checked: Settings.data.general.dimDesktop
|
|
||||||
onToggled: checked => Settings.data.general.dimDesktop = checked
|
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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue