Renamed most font and sizing shorthands properties for easier understanding and maintenance

property real fontSizeXS: 9
  property real fontSizeS: 10
  property real fontSizeM: 11
  property real fontSizeL: 13
  property real fontSizeXL: 16
  property real fontSizeXXL: 18
  property real fontSizeXXXL: 24
This commit is contained in:
quadbyte
2025-08-18 11:12:51 -04:00
parent ddd74c65e4
commit b723eccc78
56 changed files with 1419 additions and 1423 deletions
+28 -28
View File
@@ -23,13 +23,13 @@ Item {
ColumnLayout {
width: parent.width
ColumnLayout {
spacing: Style.marginLarge * scaling
Layout.margins: Style.marginLarge * scaling
spacing: Style.marginL * scaling
Layout.margins: Style.marginL * scaling
Layout.fillWidth: true
NText {
text: "Brightness Settings"
font.pointSize: Style.fontSizeXL * scaling
font.pointSize: Style.fontSizeXXL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
@@ -42,13 +42,13 @@ Item {
// Bar Visibility Section
ColumnLayout {
spacing: Style.marginSmall * scaling
spacing: Style.marginS * scaling
Layout.fillWidth: true
Layout.topMargin: Style.marginLarge * scaling
Layout.topMargin: Style.marginL * scaling
NText {
text: "Bar Integration"
font.pointSize: Style.fontSizeLarge * scaling
font.pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
@@ -65,25 +65,25 @@ Item {
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginLarge * scaling
Layout.bottomMargin: Style.marginLarge * scaling
Layout.topMargin: Style.marginL * scaling
Layout.bottomMargin: Style.marginL * scaling
}
// Brightness Step Section
ColumnLayout {
spacing: Style.marginSmall * scaling
spacing: Style.marginS * scaling
Layout.fillWidth: true
NText {
text: "Brightness Step Size"
font.pointSize: Style.fontSizeLarge * scaling
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.fontSizeSmall * scaling
font.pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
Layout.fillWidth: true
@@ -91,7 +91,7 @@ Item {
RowLayout {
Layout.fillWidth: true
spacing: Style.marginMedium * scaling
spacing: Style.marginM * scaling
NSlider {
Layout.fillWidth: true
@@ -110,7 +110,7 @@ Item {
text: Settings.data.brightness.brightnessStep + "%"
Layout.alignment: Qt.AlignVCenter
color: Color.mOnSurface
font.pointSize: Style.fontSizeMedium * scaling
font.pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
}
}
@@ -118,25 +118,25 @@ Item {
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginLarge * scaling
Layout.bottomMargin: Style.marginLarge * scaling
Layout.topMargin: Style.marginL * scaling
Layout.bottomMargin: Style.marginL * scaling
}
// Monitor Overview Section
ColumnLayout {
spacing: Style.marginSmall * scaling
spacing: Style.marginS * scaling
Layout.fillWidth: true
NText {
text: "Monitor Brightness Overview"
font.pointSize: Style.fontSizeLarge * scaling
font.pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
NText {
text: "Current brightness levels for all detected monitors."
font.pointSize: Style.fontSizeSmall * scaling
font.pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
Layout.fillWidth: true
@@ -147,25 +147,25 @@ Item {
model: BrightnessService.monitors
Rectangle {
Layout.fillWidth: true
radius: Style.radiusMedium * scaling
radius: Style.radiusM * scaling
color: Color.mSurface
border.color: Color.mOutline
border.width: Math.max(1, Style.borderThin * scaling)
border.width: Math.max(1, Style.borderS * scaling)
implicitHeight: contentCol.implicitHeight + Style.marginXL * 2 * scaling
ColumnLayout {
id: contentCol
anchors.fill: parent
anchors.margins: Style.marginLarge * scaling
spacing: Style.marginMedium * scaling
anchors.margins: Style.marginL * scaling
spacing: Style.marginM * scaling
RowLayout {
Layout.fillWidth: true
spacing: Style.marginMedium * scaling
spacing: Style.marginM * scaling
NText {
text: `${model.modelData.name} [${model.modelData.model}]`
font.pointSize: Style.fontSizeLarge * scaling
font.pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mSecondary
}
@@ -176,7 +176,7 @@ Item {
NText {
text: model.method
font.pointSize: Style.fontSizeSmall * scaling
font.pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignRight
}
@@ -184,11 +184,11 @@ Item {
RowLayout {
Layout.fillWidth: true
spacing: Style.marginMedium * scaling
spacing: Style.marginM * scaling
NText {
text: "Brightness:"
font.pointSize: Style.fontSizeMedium * scaling
font.pointSize: Style.fontSizeM * scaling
color: Color.mOnSurface
}
@@ -208,7 +208,7 @@ Item {
NText {
text: Math.round(model.brightness * 100) + "%"
font.pointSize: Style.fontSizeMedium * scaling
font.pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
color: Color.mPrimary
Layout.alignment: Qt.AlignRight