Font: added per font family scaling. removed billboard font

This commit is contained in:
ItsLemmy
2025-09-29 21:31:45 -04:00
parent 1e8b122911
commit 4b13e89a64
65 changed files with 271 additions and 276 deletions
+4 -4
View File
@@ -70,7 +70,7 @@ NBox {
NText {
text: sectionName + " Section"
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
Layout.alignment: Qt.AlignVCenter
@@ -225,7 +225,7 @@ NBox {
NText {
text: modelData.id
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
color: root.getWidgetColor(modelData)[1]
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
@@ -312,10 +312,10 @@ NBox {
z: 2000
clip: false // Ensure ghost isn't clipped
Text {
NText {
id: ghostText
anchors.centerIn: parent
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
color: Color.mOnPrimary
}
}
@@ -61,7 +61,7 @@ Popup {
text: I18n.tr("system.widget-settings-title", {
"widget": widgetSettings.widgetId
})
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mPrimary
Layout.fillWidth: true
@@ -186,8 +186,8 @@ ColumnLayout {
delegate: NText {
visible: text !== ""
text: modelData
font.family: valueUseMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
font.pointSize: Style.fontSizeM * scaling
family: valueUseMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
color: valueUsePrimaryColor ? Color.mPrimary : Color.mOnSurface
wrapMode: Text.WordWrap
@@ -217,8 +217,8 @@ ColumnLayout {
delegate: NText {
visible: text !== ""
text: modelData
font.family: valueUseMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
font.pointSize: Style.fontSizeM * scaling
family: valueUseMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
color: valueUsePrimaryColor ? Color.mPrimary : Color.mOnSurface
wrapMode: Text.WordWrap
@@ -59,7 +59,7 @@ ColumnLayout {
NIcon {
Layout.alignment: Qt.AlignVCenter
icon: valueIcon
font.pointSize: Style.fontSizeXXL * 1.5 * scaling
pointSize: Style.fontSizeXXL * 1.5 * scaling
visible: valueIcon !== "" && valueCustomIconPath === ""
}
}
@@ -37,7 +37,7 @@ ColumnLayout {
NIcon {
Layout.alignment: Qt.AlignVCenter
icon: valueIcon
font.pointSize: Style.fontSizeXL * scaling
pointSize: Style.fontSizeXL * scaling
visible: valueIcon !== ""
}
+2 -2
View File
@@ -403,7 +403,7 @@ NPanel {
NText {
text: I18n.tr(modelData.label)
color: tabTextColor
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
@@ -462,7 +462,7 @@ NPanel {
// Main title
NText {
text: I18n.tr(root.tabsModel[currentTabIndex]?.label) || ""
font.pointSize: Style.fontSizeXL * scaling
pointSize: Style.fontSizeXL * scaling
font.weight: Style.fontWeightBold
color: Color.mPrimary
Layout.fillWidth: true
+2 -2
View File
@@ -98,7 +98,7 @@ ColumnLayout {
NText {
id: updateText
text: I18n.tr("settings.about.noctalia.download-latest")
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
color: updateArea.containsMouse ? Color.mSurface : Color.mPrimary
}
}
@@ -200,7 +200,7 @@ ColumnLayout {
NText {
text: (modelData.contributions || 0) + " " + ((modelData.contributions || 0) === 1 ? "commit" : "commits")
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: contributorArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface
}
}
+1 -1
View File
@@ -309,7 +309,7 @@ ColumnLayout {
NText {
text: modelData
color: Color.mOnSurface
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: Style.marginS * scaling
}
+2 -2
View File
@@ -140,7 +140,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.bar.appearance.margins.vertical")
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
}
@@ -160,7 +160,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.bar.appearance.margins.horizontal")
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
}
+1 -1
View File
@@ -261,7 +261,7 @@ ColumnLayout {
var chunks = schemePath.replace(".json", "").split("/")
return chunks[chunks.length - 1]
}
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
color: getSchemeColor(modelData, "mOnSurface")
Layout.fillWidth: true
+16 -20
View File
@@ -174,7 +174,7 @@ ColumnLayout {
// Method text positioned in the button area
NText {
text: brightnessMonitor ? brightnessMonitor.method : ""
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
@@ -186,22 +186,18 @@ ColumnLayout {
}
}
}
// Brightness Step Section
ColumnLayout {
spacing: Style.marginS * scaling
Layout.fillWidth: true
NSpinBox {
Layout.fillWidth: true
label: I18n.tr("settings.display.monitors.brightness-step.label")
description: I18n.tr("settings.display.monitors.brightness-step.description")
minimum: 1
maximum: 50
value: Settings.data.brightness.brightnessStep
stepSize: 1
suffix: "%"
onValueChanged: Settings.data.brightness.brightnessStep = value
}
// Brightness Step
NSpinBox {
Layout.fillWidth: true
label: I18n.tr("settings.display.monitors.brightness-step.label")
description: I18n.tr("settings.display.monitors.brightness-step.description")
minimum: 1
maximum: 50
value: Settings.data.brightness.brightnessStep
stepSize: 1
suffix: "%"
onValueChanged: Settings.data.brightness.brightnessStep = value
}
}
@@ -258,7 +254,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.display.night-light.temperature.night")
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignVCenter
}
@@ -280,7 +276,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.display.night-light.temperature.day")
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignVCenter
}
@@ -327,7 +323,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.display.night-light.manual-schedule.sunrise")
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
color: Color.mOnSurfaceVariant
}
@@ -345,7 +341,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.display.night-light.manual-schedule.sunset")
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
color: Color.mOnSurfaceVariant
}
+32 -11
View File
@@ -187,6 +187,7 @@ ColumnLayout {
}
}
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginXL * scaling
@@ -236,17 +237,37 @@ ColumnLayout {
}
}
NSearchableComboBox {
label: I18n.tr("settings.general.fonts.accent.label")
description: I18n.tr("settings.general.fonts.accent.description")
model: FontService.displayFonts
currentKey: Settings.data.ui.fontBillboard
placeholder: I18n.tr("settings.general.fonts.accent.placeholder")
searchPlaceholder: I18n.tr("settings.general.fonts.accent.search-placeholder")
popupHeight: 320 * scaling
minimumWidth: 300 * scaling
onSelected: function (key) {
Settings.data.ui.fontBillboard = key
ColumnLayout {
NLabel {
label: I18n.tr("settings.general.fonts.default.scale.label")
description: I18n.tr("settings.general.fonts.default.scale.description")
}
NValueSlider {
Layout.fillWidth: true
from: 0.75
to: 1.25
stepSize: 0.01
value: Settings.data.ui.fontDefaultScale
onMoved: value => Settings.data.ui.fontDefaultScale = value
text: Math.floor(Settings.data.ui.fontDefaultScale * 100) + "%"
}
}
ColumnLayout {
NLabel {
label: I18n.tr("settings.general.fonts.monospace.scale.label")
description: I18n.tr("settings.general.fonts.monospace.scale.description")
}
NValueSlider {
Layout.fillWidth: true
from: 0.75
to: 1.25
stepSize: 0.01
value: Settings.data.ui.fontFixedScale
onMoved: value => Settings.data.ui.fontFixedScale = value
text: Math.floor(Settings.data.ui.fontFixedScale * 100) + "%"
}
}
}
+2 -2
View File
@@ -53,14 +53,14 @@ ColumnLayout {
NText {
text: I18n.tr("settings.launcher.settings.background-opacity.label")
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
NText {
text: I18n.tr("settings.launcher.settings.background-opacity.description")
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
Layout.fillWidth: true
+1 -1
View File
@@ -46,7 +46,7 @@ ColumnLayout {
"name": LocationService.stableName,
"coordinates": LocationService.displayCoordinates
})
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
color: Color.mOnSurfaceVariant
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignRight
+2 -2
View File
@@ -77,7 +77,7 @@ ColumnLayout {
text: (modelData.name || "Unknown")
color: Color.mPrimary
font.weight: Style.fontWeightBold
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
}
NTextInputButton {
@@ -327,7 +327,7 @@ ColumnLayout {
id: chipLabel
anchors.centerIn: parent
text: parent.label
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
color: parent.selected ? Color.mOnPrimary : Color.mOnSurface
}
}