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 Layout.fillWidth: true
NText { NText {
text: "Audio" text: "Audio Output Volume"
font.pointSize: Style.fontSizeXXL * scaling font.pointSize: Style.fontSizeXXL * scaling
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
color: Color.mOnSurface color: Color.mOnSurface

View file

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

View file

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

View file

@ -107,19 +107,6 @@ ColumnLayout {
spacing: Style.marginL * scaling spacing: Style.marginL * scaling
Layout.fillWidth: true 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) // Dark Mode Toggle (affects both Matugen and predefined schemes that provide variants)
NToggle { NToggle {
label: "Dark Mode" 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 { NDivider {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: Style.marginL * scaling Layout.topMargin: Style.marginL * scaling

View file

@ -88,7 +88,7 @@ Item {
NToggle { NToggle {
label: "Bar" 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 checked: (Settings.data.bar.monitors || []).indexOf(modelData.name) !== -1
onToggled: checked => { onToggled: checked => {
if (checked) { if (checked) {

View file

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

View file

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

View file

@ -96,22 +96,10 @@ ColumnLayout {
// Interval // Interval
ColumnLayout { ColumnLayout {
RowLayout { RowLayout {
Layout.fillWidth: true NLabel {
label: "Wallpaper Interval"
ColumnLayout { description: "How often to change wallpapers automatically (in seconds)."
NText { Layout.fillWidth: true
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
}
} }
NText { NText {

View file

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

View file

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