Settings: using NLabel everywhere

This commit is contained in:
quadbyte 2025-08-18 21:40:23 -04:00
parent f67a0b8420
commit 7d2534644d
10 changed files with 40 additions and 100 deletions

View file

@ -45,7 +45,7 @@ ColumnLayout {
Layout.fillWidth: true
NText {
text: "Audio"
text: "Audio Output Volume"
font.pointSize: Style.fontSizeXXL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface

View file

@ -34,7 +34,7 @@ ColumnLayout {
Layout.fillWidth: true
NText {
text: "Components"
text: "Bar Components"
font.pointSize: Style.fontSizeXXL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface

View file

@ -34,39 +34,14 @@ Item {
color: Color.mOnSurface
}
NText {
text: "Configure brightness controls and monitor settings."
font.pointSize: Style.fontSize * scaling
color: Color.mOnSurfaceVariant
}
// Bar Visibility Section
ColumnLayout {
spacing: Style.marginS * scaling
Layout.fillWidth: true
Layout.topMargin: Style.marginL * scaling
NText {
text: "Bar Integration"
font.pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
NToggle {
label: "Show Brightness Icon"
description: "Display the brightness control icon in the top bar."
checked: Settings.data.bar.showBrightness
onToggled: checked => {
Settings.data.bar.showBrightness = checked
}
}
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginL * scaling
Layout.bottomMargin: Style.marginL * scaling
NToggle {
label: "Show Bar Icon"
description: "Display the brightness control icon in the bar."
checked: Settings.data.bar.showBrightness
onToggled: checked => {
Settings.data.bar.showBrightness = checked
}
}
// Brightness Step Section
@ -74,19 +49,9 @@ Item {
spacing: Style.marginS * scaling
Layout.fillWidth: true
NText {
text: "Brightness Step Size"
font.pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
NText {
text: "Adjust the step size for brightness changes (scroll wheel, keyboard shortcuts)."
font.pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
Layout.fillWidth: true
NLabel {
label: "Brightness Step Size"
description: "Adjust the step size for brightness changes (scroll wheel, keyboard shortcuts)."
}
RowLayout {
@ -127,19 +92,9 @@ Item {
spacing: Style.marginS * scaling
Layout.fillWidth: true
NText {
text: "Monitor Brightness Overview"
font.pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
NText {
text: "Current brightness levels for all detected monitors."
font.pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
Layout.fillWidth: true
NLabel {
label: "Monitors Brightness Control"
description: "Current brightness levels for all detected monitors."
}
// Single monitor display using the same data source as the bar icon

View file

@ -107,19 +107,6 @@ ColumnLayout {
spacing: Style.marginL * scaling
Layout.fillWidth: true
// Use Matugen
NToggle {
label: "Enable Matugen"
description: "Automatically generate colors based on your active wallpaper."
checked: Settings.data.colorSchemes.useWallpaperColors
onToggled: checked => {
Settings.data.colorSchemes.useWallpaperColors = checked
if (Settings.data.colorSchemes.useWallpaperColors) {
ColorSchemeService.changedWallpaper()
}
}
}
// Dark Mode Toggle (affects both Matugen and predefined schemes that provide variants)
NToggle {
label: "Dark Mode"
@ -154,6 +141,19 @@ ColumnLayout {
}
}
// Use Matugen
NToggle {
label: "Enable Matugen"
description: "Automatically generate colors based on your active wallpaper."
checked: Settings.data.colorSchemes.useWallpaperColors
onToggled: checked => {
Settings.data.colorSchemes.useWallpaperColors = checked
if (Settings.data.colorSchemes.useWallpaperColors) {
ColorSchemeService.changedWallpaper()
}
}
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginL * scaling

View file

@ -88,7 +88,7 @@ Item {
NToggle {
label: "Bar"
description: "Enable the top bar on this monitor."
description: "Enable the bar on this monitor."
checked: (Settings.data.bar.monitors || []).indexOf(modelData.name) !== -1
onToggled: checked => {
if (checked) {

View file

@ -34,7 +34,7 @@ ColumnLayout {
Layout.fillWidth: true
NText {
text: "Recording"
text: "Recordings"
font.pointSize: Style.fontSizeXXL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface

View file

@ -38,21 +38,16 @@ Item {
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 120 * scaling
Layout.preferredHeight: 140 * scaling
radius: Style.radiusM * scaling
color: Color.mSurface
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS * scaling)
clip: true
color: Color.mPrimary
NImageRounded {
id: currentWallpaperImage
anchors.fill: parent
anchors.margins: Style.marginS * scaling
anchors.margins: Style.marginXS * scaling
imagePath: WallpaperService.currentWallpaper
fallbackIcon: "image"
borderColor: Color.mOutline
borderWidth: Math.max(1, Style.borderS * scaling)
imageRadius: Style.radiusM * scaling
}
}

View file

@ -96,22 +96,10 @@ ColumnLayout {
// Interval
ColumnLayout {
RowLayout {
Layout.fillWidth: true
ColumnLayout {
NText {
text: "Wallpaper Interval"
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
NText {
text: "How often to change wallpapers automatically (in seconds)."
font.pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurface
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
NLabel {
label: "Wallpaper Interval"
description: "How often to change wallpapers automatically (in seconds)."
Layout.fillWidth: true
}
NText {

View file

@ -6,7 +6,6 @@ import qs.Commons
Singleton {
id: root
// Automatic, orientation-agnostic scaling
function scale(aScreen) {
return scaleByName(aScreen.name)
}

View file

@ -14,6 +14,7 @@ ColumnLayout {
font.pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
visible: label !== ""
}
NText {
@ -21,5 +22,7 @@ ColumnLayout {
font.pointSize: Style.fontSizeS * scaling
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
visible: description !== ""
Layout.fillWidth: true
}
}