Settings: Rounded borders slider.

This commit is contained in:
quadbyte 2025-08-17 14:29:18 -04:00
parent 405c8717b9
commit ba1c30ef54
5 changed files with 52 additions and 9 deletions

View file

@ -88,6 +88,7 @@ Singleton {
property string avatarImage: defaultAvatar property string avatarImage: defaultAvatar
property bool dimDesktop: true property bool dimDesktop: true
property bool showScreenCorners: false property bool showScreenCorners: false
property real radiusRatio: 1.0
} }
// location // location

View file

@ -29,10 +29,10 @@ Singleton {
property int fontWeightBold: 700 property int fontWeightBold: 700
// Radii // Radii
property int radiusTiny: 8 property int radiusTiny: 8 * Settings.data.general.radiusRatio
property int radiusSmall: 12 property int radiusSmall: 12 * Settings.data.general.radiusRatio
property int radiusMedium: 16 property int radiusMedium: 16 * Settings.data.general.radiusRatio
property int radiusLarge: 20 property int radiusLarge: 20 * Settings.data.general.radiusRatio
// Border // Border
property int borderThin: 1 property int borderThin: 1

View file

@ -109,6 +109,7 @@ ColumnLayout {
NText { NText {
text: Math.floor(AudioService.volume * 100) + "%" text: Math.floor(AudioService.volume * 100) + "%"
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: Style.marginSmall * scaling
color: Color.mOnSurface color: Color.mOnSurface
} }
} }
@ -121,7 +122,7 @@ ColumnLayout {
Layout.topMargin: Style.marginMedium * scaling Layout.topMargin: Style.marginMedium * scaling
NToggle { NToggle {
label: "Mute AudioService" label: "Mute Audio Output"
description: "Mute or unmute the default audio output" description: "Mute or unmute the default audio output"
checked: AudioService.muted checked: AudioService.muted
onToggled: checked => { onToggled: checked => {

View file

@ -118,6 +118,45 @@ ColumnLayout {
Settings.data.dock.autoHide = checked Settings.data.dock.autoHide = checked
} }
} }
ColumnLayout {
spacing: Style.marginTiniest * scaling
Layout.fillWidth: true
NText {
text: "Border radius"
font.pointSize: Style.fontSizeLarge * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
NText {
text: "Adjust the rounded border of all UI elements"
font.pointSize: Style.fontSizeSmall * scaling
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
RowLayout {
NSlider {
Layout.fillWidth: true
from: 0
to: 1
stepSize: 0.01
value: Settings.data.general.radiusRatio
onMoved: Settings.data.general.radiusRatio = value
cutoutColor: Color.mSurface
}
NText {
text: Math.floor(Settings.data.general.radiusRatio * 100) + "%"
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: Style.marginSmall * scaling
color: Color.mOnSurface
}
}
}
} }
} }
} }

View file

@ -7,15 +7,17 @@ import qs.Services
Rectangle { Rectangle {
id: root id: root
color: Color.transparent
property real imageRadius: width * 0.5
radius: imageRadius
property string imagePath: "" property string imagePath: ""
property string fallbackIcon: "" property string fallbackIcon: ""
property color borderColor: Color.transparent property color borderColor: Color.transparent
property real borderWidth: 0 property real borderWidth: 0
property real imageRadius: width * 0.5
property real scaledRadius: imageRadius * Settings.data.general.radiusRatio
color: Color.transparent
radius: scaledRadius
anchors.margins: Style.marginTiniest * scaling anchors.margins: Style.marginTiniest * scaling
// Border // Border
@ -54,7 +56,7 @@ Rectangle {
visible: false visible: false
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
radius: root.imageRadius radius: scaledRadius
} }
} }