From 4b13e89a64b7467dda3746820dbfb192a7372b71 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Mon, 29 Sep 2025 21:31:45 -0400 Subject: [PATCH] Font: added per font family scaling. removed billboard font --- Assets/Translations/de.json | 6 -- Assets/Translations/en.json | 18 +++--- Assets/Translations/es.json | 6 -- Assets/Translations/fr.json | 6 -- Assets/Translations/pt.json | 6 -- Assets/Translations/zh-CN.json | 6 -- Assets/settings-default.json | 3 +- Commons/Settings.qml | 3 +- .../Bar/Bluetooth/BluetoothDevicesList.qml | 12 ++-- Modules/Bar/Bluetooth/BluetoothPanel.qml | 10 ++-- Modules/Bar/Calendar/CalendarPanel.qml | 10 ++-- Modules/Bar/Extras/BarPillHorizontal.qml | 4 +- Modules/Bar/Extras/BarPillVertical.qml | 4 +- Modules/Bar/Extras/TrayMenu.qml | 4 +- Modules/Bar/WiFi/WiFiPanel.qml | 34 +++++------ Modules/Bar/Widgets/ActiveWindow.qml | 4 +- Modules/Bar/Widgets/Clock.qml | 8 +-- Modules/Bar/Widgets/MediaMini.qml | 2 +- Modules/Bar/Widgets/SystemMonitor.qml | 24 ++++---- Modules/Bar/Widgets/Workspace.qml | 13 ++-- Modules/ControlCenter/Cards/MediaCard.qml | 8 +-- Modules/ControlCenter/Cards/ProfileCard.qml | 2 +- Modules/ControlCenter/Cards/WeatherCard.qml | 8 +-- Modules/Dock/DockMenu.qml | 6 +- Modules/Launcher/Launcher.qml | 10 ++-- Modules/LockScreen/LockScreen.qml | 59 +++++++++---------- Modules/Notification/Notification.qml | 6 +- .../Notification/NotificationHistoryPanel.qml | 14 ++--- Modules/OSD/OSD.qml | 8 +-- Modules/SessionMenu/SessionMenu.qml | 8 +-- Modules/Settings/Bar/BarSectionEditor.qml | 8 +-- .../Settings/Bar/BarWidgetSettingsDialog.qml | 2 +- .../Bar/WidgetSettings/ClockSettings.qml | 8 +-- .../WidgetSettings/ControlCenterSettings.qml | 2 +- .../WidgetSettings/CustomButtonSettings.qml | 2 +- Modules/Settings/SettingsPanel.qml | 4 +- Modules/Settings/Tabs/AboutTab.qml | 4 +- Modules/Settings/Tabs/AudioTab.qml | 2 +- Modules/Settings/Tabs/BarTab.qml | 4 +- Modules/Settings/Tabs/ColorSchemeTab.qml | 2 +- Modules/Settings/Tabs/DisplayTab.qml | 36 +++++------ Modules/Settings/Tabs/GeneralTab.qml | 43 ++++++++++---- Modules/Settings/Tabs/LauncherTab.qml | 4 +- Modules/Settings/Tabs/LocationTab.qml | 2 +- Modules/Settings/Tabs/WallpaperTab.qml | 4 +- Modules/Toast/SimpleToast.qml | 4 +- Modules/Tooltip/Tooltip.qml | 2 +- Modules/Wallpaper/WallpaperPanel.qml | 12 ++-- Widgets/NButton.qml | 3 +- Widgets/NCircleStat.qml | 2 +- Widgets/NCollapsible.qml | 4 +- Widgets/NColorPicker.qml | 2 +- Widgets/NColorPickerDialog.qml | 12 ++-- Widgets/NComboBox.qml | 4 +- Widgets/NContextMenu.qml | 2 +- Widgets/NDateTimeTokens.qml | 8 +-- Widgets/NFilePicker.qml | 10 ++-- Widgets/NHeader.qml | 4 +- Widgets/NIconPicker.qml | 6 +- Widgets/NLabel.qml | 4 +- Widgets/NRadioButton.qml | 2 +- Widgets/NSearchableComboBox.qml | 4 +- Widgets/NSpinBox.qml | 8 +-- Widgets/NText.qml | 11 +++- Widgets/NValueSlider.qml | 4 +- 65 files changed, 271 insertions(+), 276 deletions(-) diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index f624ab06e..76511329b 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -71,12 +71,6 @@ "description": "Monospace-Schriftart für Zahlen und Statistik-Anzeigen.", "placeholder": "Monospace-Schriftart auswählen...", "search-placeholder": "Monospace-Schriftarten suchen..." - }, - "accent": { - "label": "Akzent-Schriftart", - "description": "Große Schriftart für hervorgehobene Anzeigen.", - "placeholder": "Display-Schriftart auswählen...", - "search-placeholder": "Display-Schriftarten suchen..." } } }, diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 25b42c3b0..1ded8fcf3 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -64,19 +64,21 @@ "label": "Default font", "description": "Main font used throughout the interface.", "placeholder": "Select default font...", - "search-placeholder": "Search fonts..." + "search-placeholder": "Search font...", + "scale": { + "label": "Default font size", + "description": "Increase or decrease the size of the standard text." + } }, "monospace": { "label": "Monospaced font", "description": "Monospaced font used for numbers and stats display.", "placeholder": "Select monospace font...", - "search-placeholder": "Search monospace fonts..." - }, - "accent": { - "label": "Accent font", - "description": "Large font used for prominent displays.", - "placeholder": "Select display font...", - "search-placeholder": "Search display fonts..." + "search-placeholder": "Search monospace font...", + "scale": { + "label": "Monospaced font size", + "description": "Increase or decrease the size of the monospaced text." + } } } }, diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index 398a59352..2effb7030 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -69,12 +69,6 @@ "description": "Fuente monoespaciada utilizada para la visualización de números y estadísticas.", "placeholder": "Seleccionar fuente monoespaciada...", "search-placeholder": "Buscar fuentes monoespaciadas..." - }, - "accent": { - "label": "Fuente de acento", - "description": "Fuente grande utilizada para visualizaciones destacadas.", - "placeholder": "Seleccionar fuente de visualización...", - "search-placeholder": "Buscar fuentes de visualización..." } } }, diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 15aecc4f2..86ab1b482 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -69,12 +69,6 @@ "description": "Police à chasse fixe utilisée pour l'affichage des chiffres et des statistiques.", "placeholder": "Sélectionner la police à chasse fixe...", "search-placeholder": "Rechercher des polices à chasse fixe..." - }, - "accent": { - "label": "Police d'accentuation", - "description": "Grande police utilisée pour les affichages proéminents.", - "placeholder": "Sélectionner la police d'affichage...", - "search-placeholder": "Rechercher des polices d'affichage..." } } }, diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index b37bd5473..365d6be9b 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -69,12 +69,6 @@ "description": "Fonte monoespaçada usada para exibição de números e estatísticas.", "placeholder": "Selecione a fonte monoespaçada...", "search-placeholder": "Pesquisar fontes monoespaçadas..." - }, - "accent": { - "label": "Fonte de destaque", - "description": "Fonte grande usada para exibições proeminentes.", - "placeholder": "Selecione a fonte de exibição...", - "search-placeholder": "Pesquisar fontes de exibição..." } } }, diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 2fd17a684..baeffea4b 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -69,12 +69,6 @@ "description": "用于数字和统计信息显示的等宽字体。", "placeholder": "选择等宽字体...", "search-placeholder": "搜索等宽字体..." - }, - "accent": { - "label": "强调字体", - "description": "用于突出显示内容的大字体。", - "placeholder": "选择标题字体...", - "search-placeholder": "搜索标题字体..." } } }, diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 3fddf7cd5..d0a353977 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -148,7 +148,8 @@ "ui": { "fontDefault": "Roboto", "fontFixed": "DejaVu Sans Mono", - "fontBillboard": "Inter", + "fontDefaultScale": 1, + "fontFixedScale": 1, "monitorsScaling": [], "idleInhibitorEnabled": false }, diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 986d42488..8fd245c71 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -272,7 +272,8 @@ Singleton { property JsonObject ui: JsonObject { property string fontDefault: "Roboto" property string fontFixed: "DejaVu Sans Mono" - property string fontBillboard: "Inter" + property real fontDefaultScale: 1.0 + property real fontFixedScale: 1.0 property list monitorsScaling: [] property bool idleInhibitorEnabled: false } diff --git a/Modules/Bar/Bluetooth/BluetoothDevicesList.qml b/Modules/Bar/Bluetooth/BluetoothDevicesList.qml index a7895e476..5e6a71092 100644 --- a/Modules/Bar/Bluetooth/BluetoothDevicesList.qml +++ b/Modules/Bar/Bluetooth/BluetoothDevicesList.qml @@ -22,7 +22,7 @@ ColumnLayout { NText { text: root.label - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling color: Color.mSecondary font.weight: Style.fontWeightMedium Layout.fillWidth: true @@ -79,7 +79,7 @@ ColumnLayout { // Device name NText { text: modelData.name || modelData.deviceName - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightMedium elide: Text.ElideRight color: getContentColor(Color.mOnSurface) @@ -90,7 +90,7 @@ ColumnLayout { NText { text: BluetoothService.getStatusString(modelData) visible: text !== "" - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling color: getContentColor(Color.mOnSurfaceVariant) } @@ -103,7 +103,7 @@ ColumnLayout { // Device signal strength - "Unknown" when not connected NText { text: BluetoothService.getSignalStrength(modelData) - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling color: getContentColor(Color.mOnSurfaceVariant) } @@ -117,7 +117,7 @@ ColumnLayout { NText { visible: modelData.signalStrength > 0 && !modelData.pairing && !modelData.blocked text: (modelData.signalStrength !== undefined && modelData.signalStrength > 0) ? modelData.signalStrength + "%" : "" - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling color: getContentColor(Color.mOnSurface) } } @@ -126,7 +126,7 @@ ColumnLayout { NText { visible: modelData.batteryAvailable text: BluetoothService.getBattery(modelData) - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling color: getContentColor(Color.mOnSurfaceVariant) } } diff --git a/Modules/Bar/Bluetooth/BluetoothPanel.qml b/Modules/Bar/Bluetooth/BluetoothPanel.qml index c625f1f1e..46ad20467 100644 --- a/Modules/Bar/Bluetooth/BluetoothPanel.qml +++ b/Modules/Bar/Bluetooth/BluetoothPanel.qml @@ -36,7 +36,7 @@ NPanel { NText { text: I18n.tr("bluetooth.panel.title") - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold color: Color.mOnSurface Layout.fillWidth: true @@ -95,14 +95,14 @@ NPanel { NText { text: I18n.tr("bluetooth.panel.disabled") - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter } NText { text: I18n.tr("bluetooth.panel.enable-message") - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter } @@ -200,14 +200,14 @@ NPanel { NText { text: I18n.tr("bluetooth.panel.scanning") - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling color: Color.mOnSurface } } NText { text: I18n.tr("bluetooth.panel.pairing-mode") - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter } diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index ac70310cd..8fedb3b92 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -43,7 +43,7 @@ NPanel { text: grid.title Layout.fillWidth: true horizontalAlignment: Text.AlignHCenter - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightBold color: Color.mPrimary } @@ -83,7 +83,7 @@ NPanel { anchors.centerIn: parent text: I18n.tr("calendar.panel.week") color: Color.mOutline - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling font.weight: Style.fontWeightRegular horizontalAlignment: Text.AlignHCenter } @@ -113,7 +113,7 @@ NPanel { return Qt.locale().dayName(dayIndex, Locale.ShortFormat) } color: Color.mSecondary - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightBold horizontalAlignment: Text.AlignHCenter } @@ -148,7 +148,7 @@ NPanel { NText { anchors.centerIn: parent color: Color.mOutline - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling font.weight: Style.fontWeightBold text: { // Calculate the date shown in the first column of this row @@ -229,7 +229,7 @@ NPanel { text: model.day color: model.today ? Color.mOnPrimary : Color.mOnSurface opacity: model.month === grid.month ? Style.opacityHeavy : Style.opacityLight - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling font.weight: model.today ? Style.fontWeightBold : Style.fontWeightRegular } diff --git a/Modules/Bar/Extras/BarPillHorizontal.qml b/Modules/Bar/Extras/BarPillHorizontal.qml index f3dac5701..2bdd1f1dd 100644 --- a/Modules/Bar/Extras/BarPillHorizontal.qml +++ b/Modules/Bar/Extras/BarPillHorizontal.qml @@ -84,8 +84,8 @@ Item { return centerX + offset } text: root.text + root.suffix - font.family: Settings.data.ui.fontFixed - font.pointSize: textSize + family: Settings.data.ui.fontFixed + pointSize: textSize font.weight: Style.fontWeightBold color: forceOpen ? Color.mOnSurface : Color.mPrimary visible: revealed diff --git a/Modules/Bar/Extras/BarPillVertical.qml b/Modules/Bar/Extras/BarPillVertical.qml index aeb89f49a..5bdf75c39 100644 --- a/Modules/Bar/Extras/BarPillVertical.qml +++ b/Modules/Bar/Extras/BarPillVertical.qml @@ -98,8 +98,8 @@ Item { return offset } text: root.text + root.suffix - font.family: Settings.data.ui.fontFixed - font.pointSize: textSize + family: Settings.data.ui.fontFixed + pointSize: textSize font.weight: Style.fontWeightMedium horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter diff --git a/Modules/Bar/Extras/TrayMenu.qml b/Modules/Bar/Extras/TrayMenu.qml index 8753deb85..415333fd4 100644 --- a/Modules/Bar/Extras/TrayMenu.qml +++ b/Modules/Bar/Extras/TrayMenu.qml @@ -160,7 +160,7 @@ PopupWindow { Layout.fillWidth: true color: (modelData?.enabled ?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.mOnSurfaceVariant text: modelData?.text !== "" ? modelData?.text.replace(/[\n\r]+/g, ' ') : "..." - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling verticalAlignment: Text.AlignVCenter wrapMode: Text.WordWrap } @@ -175,7 +175,7 @@ PopupWindow { NIcon { icon: modelData?.hasChildren ? "menu" : "" - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling verticalAlignment: Text.AlignVCenter visible: modelData?.hasChildren ?? false color: (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) diff --git a/Modules/Bar/WiFi/WiFiPanel.qml b/Modules/Bar/WiFi/WiFiPanel.qml index ebb8a0b7a..e205e8bea 100644 --- a/Modules/Bar/WiFi/WiFiPanel.qml +++ b/Modules/Bar/WiFi/WiFiPanel.qml @@ -41,7 +41,7 @@ NPanel { NText { text: I18n.tr("wifi.panel.title") - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold color: Color.mOnSurface Layout.fillWidth: true @@ -99,7 +99,7 @@ NPanel { NText { text: NetworkService.lastError color: Color.mError - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling wrapMode: Text.Wrap Layout.fillWidth: true } @@ -137,14 +137,14 @@ NPanel { NText { text: I18n.tr("wifi.panel.disabled") - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter } NText { text: I18n.tr("wifi.panel.enable-message") - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter } @@ -173,7 +173,7 @@ NPanel { NText { text: I18n.tr("wifi.panel.searching") - font.pointSize: Style.fontSizeNormal * scaling + pointSize: Style.fontSizeNormal * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter } @@ -252,7 +252,7 @@ NPanel { NText { text: modelData.ssid - font.pointSize: Style.fontSizeNormal * scaling + pointSize: Style.fontSizeNormal * scaling font.weight: modelData.connected ? Style.fontWeightBold : Style.fontWeightMedium color: Color.mOnSurface elide: Text.ElideRight @@ -266,19 +266,19 @@ NPanel { text: I18n.tr("system.signal-strength", { "signal": modelData.signal }) - font.pointSize: Style.fontSizeXXS * scaling + pointSize: Style.fontSizeXXS * scaling color: Color.mOnSurfaceVariant } NText { text: "•" - font.pointSize: Style.fontSizeXXS * scaling + pointSize: Style.fontSizeXXS * scaling color: Color.mOnSurfaceVariant } NText { text: NetworkService.isSecured(modelData.security) ? modelData.security : "Open" - font.pointSize: Style.fontSizeXXS * scaling + pointSize: Style.fontSizeXXS * scaling color: Color.mOnSurfaceVariant } @@ -298,7 +298,7 @@ NPanel { id: connectedText anchors.centerIn: parent text: I18n.tr("wifi.panel.connected") - font.pointSize: Style.fontSizeXXS * scaling + pointSize: Style.fontSizeXXS * scaling color: Color.mOnPrimary } } @@ -314,7 +314,7 @@ NPanel { id: disconnectingText anchors.centerIn: parent text: I18n.tr("wifi.panel.disconnecting") - font.pointSize: Style.fontSizeXXS * scaling + pointSize: Style.fontSizeXXS * scaling color: Color.mOnPrimary } } @@ -330,7 +330,7 @@ NPanel { id: forgettingText anchors.centerIn: parent text: I18n.tr("wifi.panel.forgetting") - font.pointSize: Style.fontSizeXXS * scaling + pointSize: Style.fontSizeXXS * scaling color: Color.mOnPrimary } } @@ -348,7 +348,7 @@ NPanel { id: savedText anchors.centerIn: parent text: I18n.tr("wifi.panel.saved") - font.pointSize: Style.fontSizeXXS * scaling + pointSize: Style.fontSizeXXS * scaling color: Color.mOnSurfaceVariant } } @@ -456,12 +456,12 @@ NPanel { } } - Text { + NText { visible: parent.text.length === 0 anchors.verticalCenter: parent.verticalCenter text: I18n.tr("wifi.panel.enter-password") color: Color.mOnSurfaceVariant - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling } } } @@ -514,7 +514,7 @@ NPanel { NText { text: I18n.tr("wifi.panel.forget-network") - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: Color.mError Layout.fillWidth: true } @@ -564,7 +564,7 @@ NPanel { NText { text: I18n.tr("wifi.panel.no-networks") - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter } diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index 2dbccdbc8..711ab18ce 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -108,7 +108,7 @@ Item { id: fullTitleMetrics visible: false text: windowTitle - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling font.weight: Style.fontWeightMedium } @@ -245,7 +245,7 @@ Item { NText { id: titleText text: windowTitle - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling font.weight: Style.fontWeightMedium verticalAlignment: Text.AlignVCenter color: Color.mOnSurface diff --git a/Modules/Bar/Widgets/Clock.qml b/Modules/Bar/Widgets/Clock.qml index 14e1f4df6..810d2b9fa 100644 --- a/Modules/Bar/Widgets/Clock.qml +++ b/Modules/Bar/Widgets/Clock.qml @@ -65,8 +65,8 @@ Rectangle { NText { visible: text !== "" text: modelData - font.family: useMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault - font.pointSize: { + family: useMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault + pointSize: { if (repeater.model.length == 1) { return Style.fontSizeS * scaling } else { @@ -95,8 +95,8 @@ Rectangle { delegate: NText { visible: text !== "" text: modelData - font.family: useMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault - font.pointSize: Style.fontSizeS * scaling + family: useMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault + pointSize: Style.fontSizeS * scaling font.weight: Style.fontWeightBold color: usePrimaryColor ? Color.mPrimary : Color.mOnSurface wrapMode: Text.WordWrap diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index 2b5348da6..98aadcddf 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -275,7 +275,7 @@ Item { NText { id: titleText text: getTitle() - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling font.weight: Style.fontWeightMedium verticalAlignment: Text.AlignVCenter color: Color.mOnSurface diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index 2376af862..2d9f47e95 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -114,8 +114,8 @@ Rectangle { NText { text: `${Math.round(SystemStatService.cpuUsage)}%` - font.family: Settings.data.ui.fontFixed - font.pointSize: textSize + family: Settings.data.ui.fontFixed + pointSize: textSize font.weight: Style.fontWeightMedium Layout.alignment: Qt.AlignCenter Layout.preferredWidth: isVertical ? -1 : percentTextWidth @@ -155,8 +155,8 @@ Rectangle { NText { text: `${Math.round(SystemStatService.cpuTemp)}°` - font.family: Settings.data.ui.fontFixed - font.pointSize: textSize + family: Settings.data.ui.fontFixed + pointSize: textSize font.weight: Style.fontWeightMedium Layout.alignment: Qt.AlignCenter Layout.preferredWidth: isVertical ? -1 : tempTextWidth @@ -196,8 +196,8 @@ Rectangle { NText { text: showMemoryAsPercent ? `${Math.round(SystemStatService.memPercent)}%` : `${SystemStatService.memGb.toFixed(1)}G` - font.family: Settings.data.ui.fontFixed - font.pointSize: textSize + family: Settings.data.ui.fontFixed + pointSize: textSize font.weight: Style.fontWeightMedium Layout.alignment: Qt.AlignCenter Layout.preferredWidth: isVertical ? -1 : (showMemoryAsPercent ? percentTextWidth : memTextWidth) @@ -237,8 +237,8 @@ Rectangle { NText { text: isVertical ? SystemStatService.formatCompactSpeed(SystemStatService.rxSpeed) : SystemStatService.formatSpeed(SystemStatService.rxSpeed) - font.family: Settings.data.ui.fontFixed - font.pointSize: textSize + family: Settings.data.ui.fontFixed + pointSize: textSize font.weight: Style.fontWeightMedium Layout.alignment: Qt.AlignCenter Layout.preferredWidth: isVertical ? -1 : memTextWidth @@ -278,8 +278,8 @@ Rectangle { NText { text: isVertical ? SystemStatService.formatCompactSpeed(SystemStatService.txSpeed) : SystemStatService.formatSpeed(SystemStatService.txSpeed) - font.family: Settings.data.ui.fontFixed - font.pointSize: textSize + family: Settings.data.ui.fontFixed + pointSize: textSize font.weight: Style.fontWeightMedium Layout.alignment: Qt.AlignCenter Layout.preferredWidth: isVertical ? -1 : memTextWidth @@ -319,8 +319,8 @@ Rectangle { NText { text: `${SystemStatService.diskPercent}%` - font.family: Settings.data.ui.fontFixed - font.pointSize: textSize + family: Settings.data.ui.fontFixed + pointSize: textSize font.weight: Style.fontWeightMedium Layout.alignment: Qt.AlignCenter Layout.preferredWidth: isVertical ? -1 : percentTextWidth diff --git a/Modules/Bar/Widgets/Workspace.qml b/Modules/Bar/Widgets/Workspace.qml index 33c1f5803..689b962fa 100644 --- a/Modules/Bar/Widgets/Workspace.qml +++ b/Modules/Bar/Widgets/Workspace.qml @@ -7,6 +7,7 @@ import Quickshell import Quickshell.Io import qs.Commons import qs.Services +import qs.Widgets Item { id: root @@ -274,7 +275,7 @@ Item { Loader { active: (labelMode !== "none") sourceComponent: Component { - Text { + NText { x: (pill.width - width) / 2 y: (pill.height - height) / 2 + (height - contentHeight) / 2 text: { @@ -284,9 +285,9 @@ Item { return model.idx.toString() } } - font.pointSize: model.isFocused ? workspacePillContainer.height * 0.45 : workspacePillContainer.height * 0.42 + family: Settings.data.ui.fontFixed + pointSize: model.isFocused ? workspacePillContainer.height * 0.45 : workspacePillContainer.height * 0.42 font.capitalization: Font.AllUppercase - font.family: Settings.data.ui.fontFixed font.weight: Style.fontWeightBold wrapMode: Text.Wrap color: { @@ -418,7 +419,7 @@ Item { Loader { active: (labelMode !== "none") sourceComponent: Component { - Text { + NText { x: (pillVertical.width - width) / 2 y: (pillVertical.height - height) / 2 + (height - contentHeight) / 2 text: { @@ -428,9 +429,9 @@ Item { return model.idx.toString() } } - font.pointSize: model.isFocused ? workspacePillContainerVertical.width * 0.45 : workspacePillContainerVertical.width * 0.42 + family: Settings.data.ui.fontFixed + pointSize: model.isFocused ? workspacePillContainerVertical.width * 0.45 : workspacePillContainerVertical.width * 0.42 font.capitalization: Font.AllUppercase - font.family: Settings.data.ui.fontFixed font.weight: Style.fontWeightBold wrapMode: Text.Wrap color: { diff --git a/Modules/ControlCenter/Cards/MediaCard.qml b/Modules/ControlCenter/Cards/MediaCard.qml index 032eb1068..da223e5be 100644 --- a/Modules/ControlCenter/Cards/MediaCard.qml +++ b/Modules/ControlCenter/Cards/MediaCard.qml @@ -74,7 +74,7 @@ NBox { NText { text: playerSelectorButton.currentPlayer ? playerSelectorButton.currentPlayer.identity : "" - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling color: Color.mOnSurfaceVariant Layout.fillWidth: true } @@ -162,7 +162,7 @@ NBox { NText { visible: MediaService.trackTitle !== "" text: MediaService.trackTitle - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightBold elide: Text.ElideRight wrapMode: Text.Wrap @@ -174,7 +174,7 @@ NBox { visible: MediaService.trackArtist !== "" text: MediaService.trackArtist color: Color.mPrimary - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling elide: Text.ElideRight Layout.fillWidth: true } @@ -183,7 +183,7 @@ NBox { visible: MediaService.trackAlbum !== "" text: MediaService.trackAlbum color: Color.mOnSurface - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling elide: Text.ElideRight Layout.fillWidth: true } diff --git a/Modules/ControlCenter/Cards/ProfileCard.qml b/Modules/ControlCenter/Cards/ProfileCard.qml index 9b619edfb..6728ef7fe 100644 --- a/Modules/ControlCenter/Cards/ProfileCard.qml +++ b/Modules/ControlCenter/Cards/ProfileCard.qml @@ -45,7 +45,7 @@ NBox { text: I18n.tr("system.uptime", { "uptime": uptimeText }) - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: Color.mOnSurfaceVariant } } diff --git a/Modules/ControlCenter/Cards/WeatherCard.qml b/Modules/ControlCenter/Cards/WeatherCard.qml index a5cf8f45e..1bda1b822 100644 --- a/Modules/ControlCenter/Cards/WeatherCard.qml +++ b/Modules/ControlCenter/Cards/WeatherCard.qml @@ -36,7 +36,7 @@ NBox { const chunks = Settings.data.location.name.split(",") return chunks[0] } - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold } @@ -56,13 +56,13 @@ NBox { temp = Math.round(temp) return `${temp}°${suffix}` } - font.pointSize: Style.fontSizeXL * scaling + pointSize: Style.fontSizeXL * scaling font.weight: Style.fontWeightBold } NText { text: weatherReady ? `(${LocationService.data.weather.timezone_abbreviation})` : "" - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling color: Color.mOnSurfaceVariant visible: LocationService.data.weather } @@ -112,7 +112,7 @@ NBox { min = Math.round(min) return `${max}°/${min}°` } - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling color: Color.mOnSurfaceVariant } } diff --git a/Modules/Dock/DockMenu.qml b/Modules/Dock/DockMenu.qml index ffd30a24c..90388e3ad 100644 --- a/Modules/Dock/DockMenu.qml +++ b/Modules/Dock/DockMenu.qml @@ -196,7 +196,7 @@ PopupWindow { NText { text: I18n.tr("dock.menu.focus") - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: root.hoveredItem === 0 ? Color.mOnTertiary : Color.mOnSurfaceVariant Layout.alignment: Qt.AlignVCenter } @@ -233,7 +233,7 @@ PopupWindow { return I18n.tr("dock.menu.pin") return root.isAppPinned(root.toplevel.appId) ? I18n.tr("dock.menu.unpin") : I18n.tr("dock.menu.pin") } - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: root.hoveredItem === 1 ? Color.mOnTertiary : Color.mOnSurfaceVariant Layout.alignment: Qt.AlignVCenter } @@ -262,7 +262,7 @@ PopupWindow { NText { text: I18n.tr("dock.menu.close") - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: root.hoveredItem === 2 ? Color.mOnTertiary : Color.mOnSurfaceVariant Layout.alignment: Qt.AlignVCenter } diff --git a/Modules/Launcher/Launcher.qml b/Modules/Launcher/Launcher.qml index e79bee6b0..195512fdf 100644 --- a/Modules/Launcher/Launcher.qml +++ b/Modules/Launcher/Launcher.qml @@ -438,7 +438,7 @@ NPanel { anchors.centerIn: parent visible: !imagePreview.visible && !iconLoader.visible text: modelData.name ? modelData.name.charAt(0).toUpperCase() : "?" - font.pointSize: Style.fontSizeXXL * scaling + pointSize: Style.fontSizeXXL * scaling font.weight: Style.fontWeightBold color: Color.mOnPrimary } @@ -464,7 +464,7 @@ NPanel { const parts = desc.split(" • ") return parts[0] || "IMG" } - font.pointSize: Style.fontSizeXXS * scaling + pointSize: Style.fontSizeXXS * scaling color: Color.mPrimary } } @@ -477,7 +477,7 @@ NPanel { NText { text: modelData.name || "Unknown" - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold color: entry.isSelected ? Color.mOnTertiary : Color.mOnSurface elide: Text.ElideRight @@ -486,7 +486,7 @@ NPanel { NText { text: modelData.description || "" - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: entry.isSelected ? Color.mOnTertiary : Color.mOnSurfaceVariant elide: Text.ElideRight Layout.fillWidth: true @@ -536,7 +536,7 @@ NPanel { const prefix = activePlugin?.name ? `${activePlugin.name}: ` : "" return prefix + `${results.length} result${results.length !== 1 ? 's' : ''}` } - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling color: Color.mOnSurfaceVariant horizontalAlignment: Text.AlignCenter } diff --git a/Modules/LockScreen/LockScreen.qml b/Modules/LockScreen/LockScreen.qml index bdb5f4f41..de7bdc212 100644 --- a/Modules/LockScreen/LockScreen.qml +++ b/Modules/LockScreen/LockScreen.qml @@ -147,9 +147,8 @@ Loader { NText { id: timeText text: formatTime() - font.family: Settings.data.ui.fontBillboard // Smaller time display when using longer 12 hour format - font.pointSize: Settings.data.location.use12hourFormat ? Style.fontSizeXXXL * 4 * scaling : Style.fontSizeXXXL * 5 * scaling + pointSize: Settings.data.location.use12hourFormat ? Style.fontSizeXXXL * 4 * scaling : Style.fontSizeXXXL * 5 * scaling font.weight: Style.fontWeightBold font.letterSpacing: -2 * scaling color: Color.mOnSurface @@ -174,8 +173,7 @@ Loader { NText { id: dateText text: formatDate() - font.family: Settings.data.ui.fontBillboard - font.pointSize: Style.fontSizeXXL * scaling + pointSize: Style.fontSizeXXL * scaling font.weight: Font.Light color: Color.mOnSurface horizontalAlignment: Text.AlignHCenter @@ -385,8 +383,8 @@ Loader { NText { text: I18n.tr("lock-screen.secure-terminal") color: Color.mOnSurface - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeL * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold Layout.fillWidth: true } @@ -396,8 +394,8 @@ Loader { NText { text: keyboardLayout.currentLayout color: Color.mOnSurface - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeM * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightBold } NIcon { @@ -419,8 +417,8 @@ Loader { NText { text: Math.round(batteryIndicator.percent) + "%" color: Color.mOnSurface - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeM * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightBold } } @@ -443,8 +441,8 @@ Loader { NText { text: Quickshell.env("USER") + "@noctalia:~$" color: Color.mPrimary - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeL * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold } @@ -452,8 +450,8 @@ Loader { id: welcomeText text: "" color: Color.mOnSurface - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeL * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeL * scaling property int currentIndex: 0 property string fullText: I18n.tr("system.welcome-back", { "user": Quickshell.env("USER") @@ -482,16 +480,16 @@ Loader { NText { text: Quickshell.env("USER") + "@noctalia:~$" color: Color.mPrimary - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeL * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold } NText { text: I18n.tr("lock-screen.unlock-command") color: Color.mOnSurface - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeL * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeL * scaling } } @@ -502,8 +500,8 @@ Loader { NText { text: I18n.tr("lock-screen.password") color: Color.mPrimary - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeL * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold } @@ -545,8 +543,8 @@ Loader { id: asterisksText text: "*".repeat(passwordInput.text.length) color: Color.mOnSurface - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeL * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeL * scaling visible: passwordInput.activeFocus && !lockContext.unlockInProgress anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter @@ -612,8 +610,7 @@ Loader { return Color.mError return Color.transparent } - font.family: "DejaVu Sans Mono" - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling Layout.fillWidth: true SequentialAnimation on opacity { @@ -647,8 +644,8 @@ Loader { anchors.centerIn: parent text: lockContext.unlockInProgress ? "EXECUTING" : "EXECUTE" color: executeButtonArea.containsMouse ? Color.mOnPrimary : Color.mPrimary - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeM * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightBold } @@ -767,8 +764,8 @@ Loader { text: messages[index % messages.length] color: Color.mError - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeXXL * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeXXL * scaling font.weight: Style.fontWeightBold x: baseX @@ -905,7 +902,7 @@ Loader { anchors.margins: Style.marginM * scaling anchors.fill: parent text: I18n.tr("lock-screen.shut-down") - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: Color.mOnSurfaceVariant horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter @@ -957,7 +954,7 @@ Loader { anchors.margins: Style.marginM * scaling anchors.fill: parent text: I18n.tr("lock-screen.restart") - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: Color.mOnSurfaceVariant horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter @@ -1010,7 +1007,7 @@ Loader { anchors.margins: Style.marginM * scaling anchors.fill: parent text: I18n.tr("lock-screen.suspend") - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: Color.mOnSurfaceVariant horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index bb868bd6c..3ffe05e2f 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -307,7 +307,7 @@ Variants { NText { text: `${model.appName || I18n.tr("system.unknown-app")} · ${Time.formatRelativeTime(model.timestamp)}` color: Color.mSecondary - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling } Item { @@ -317,7 +317,7 @@ Variants { NText { text: model.summary || I18n.tr("general.no-summary") - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightMedium color: Color.mOnSurface textFormat: Text.PlainText @@ -330,7 +330,7 @@ Variants { NText { text: model.body || "" - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling color: Color.mOnSurface textFormat: Text.PlainText wrapMode: Text.WrapAtWordBoundaryOrAnywhere diff --git a/Modules/Notification/NotificationHistoryPanel.qml b/Modules/Notification/NotificationHistoryPanel.qml index f5bd43d7c..5b0f56273 100644 --- a/Modules/Notification/NotificationHistoryPanel.qml +++ b/Modules/Notification/NotificationHistoryPanel.qml @@ -38,7 +38,7 @@ NPanel { NText { text: I18n.tr("notifications.panel.title") - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold color: Color.mOnSurface Layout.fillWidth: true @@ -95,14 +95,14 @@ NPanel { NText { text: I18n.tr("notifications.panel.no-notifications") - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter } NText { text: I18n.tr("notifications.panel.description") - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter Layout.fillWidth: true @@ -199,13 +199,13 @@ NPanel { NText { text: model.appName || "Unknown App" - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling color: Color.mSecondary } NText { text: Time.formatRelativeTime(model.timestamp) - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling color: Color.mSecondary } @@ -217,7 +217,7 @@ NPanel { // Summary NText { text: model.summary || I18n.tr("general.no-summary") - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling font.weight: Font.Medium color: Color.mOnSurface textFormat: Text.PlainText @@ -230,7 +230,7 @@ NPanel { // Body NText { text: model.body || "" - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: Color.mOnSurfaceVariant textFormat: Text.PlainText wrapMode: Text.Wrap diff --git a/Modules/OSD/OSD.qml b/Modules/OSD/OSD.qml index e518cf891..8b33101bb 100644 --- a/Modules/OSD/OSD.qml +++ b/Modules/OSD/OSD.qml @@ -299,8 +299,8 @@ Variants { NText { text: root.getDisplayPercentage() color: Color.mOnSurface - font.pointSize: Style.fontSizeS * root.scaling - font.family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeS * root.scaling + family: Settings.data.ui.fontFixed Layout.alignment: Qt.AlignVCenter horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter @@ -340,8 +340,8 @@ Variants { id: percentText text: root.getDisplayPercentage() color: Color.mOnSurface - font.pointSize: Style.fontSizeS * root.scaling - font.family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeS * root.scaling + family: Settings.data.ui.fontFixed anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter horizontalAlignment: Text.AlignHCenter diff --git a/Modules/SessionMenu/SessionMenu.qml b/Modules/SessionMenu/SessionMenu.qml index 885b43ed0..e48ab0d57 100644 --- a/Modules/SessionMenu/SessionMenu.qml +++ b/Modules/SessionMenu/SessionMenu.qml @@ -276,7 +276,7 @@ NPanel { "seconds": Math.ceil(timeRemaining / 1000) }) : I18n.tr("session-menu.title") font.weight: Style.fontWeightBold - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling color: timerActive ? Color.mPrimary : Color.mOnSurface Layout.alignment: Qt.AlignVCenter verticalAlignment: Text.AlignVCenter @@ -409,7 +409,7 @@ NPanel { NText { text: buttonRoot.title font.weight: Style.fontWeightMedium - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling color: { if (buttonRoot.pending) return Color.mPrimary @@ -434,7 +434,7 @@ NPanel { } return buttonRoot.subtitle } - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling color: { if (buttonRoot.pending) return Color.mPrimary @@ -464,7 +464,7 @@ NPanel { NText { anchors.centerIn: parent text: Math.ceil(timeRemaining / 1000) - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling font.weight: Style.fontWeightBold color: Color.mOnPrimary } diff --git a/Modules/Settings/Bar/BarSectionEditor.qml b/Modules/Settings/Bar/BarSectionEditor.qml index b1b9e10d6..ba587246b 100644 --- a/Modules/Settings/Bar/BarSectionEditor.qml +++ b/Modules/Settings/Bar/BarSectionEditor.qml @@ -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 } } diff --git a/Modules/Settings/Bar/BarWidgetSettingsDialog.qml b/Modules/Settings/Bar/BarWidgetSettingsDialog.qml index 4e52bc68b..1c2a1aaf7 100644 --- a/Modules/Settings/Bar/BarWidgetSettingsDialog.qml +++ b/Modules/Settings/Bar/BarWidgetSettingsDialog.qml @@ -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 diff --git a/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml b/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml index af48201a8..fe3f1e738 100644 --- a/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml @@ -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 diff --git a/Modules/Settings/Bar/WidgetSettings/ControlCenterSettings.qml b/Modules/Settings/Bar/WidgetSettings/ControlCenterSettings.qml index cd44b9417..ac4ae04ca 100644 --- a/Modules/Settings/Bar/WidgetSettings/ControlCenterSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/ControlCenterSettings.qml @@ -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 === "" } } diff --git a/Modules/Settings/Bar/WidgetSettings/CustomButtonSettings.qml b/Modules/Settings/Bar/WidgetSettings/CustomButtonSettings.qml index 9c7aaed0e..0520740fc 100644 --- a/Modules/Settings/Bar/WidgetSettings/CustomButtonSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/CustomButtonSettings.qml @@ -37,7 +37,7 @@ ColumnLayout { NIcon { Layout.alignment: Qt.AlignVCenter icon: valueIcon - font.pointSize: Style.fontSizeXL * scaling + pointSize: Style.fontSizeXL * scaling visible: valueIcon !== "" } diff --git a/Modules/Settings/SettingsPanel.qml b/Modules/Settings/SettingsPanel.qml index 266f86671..4a5706b8e 100644 --- a/Modules/Settings/SettingsPanel.qml +++ b/Modules/Settings/SettingsPanel.qml @@ -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 diff --git a/Modules/Settings/Tabs/AboutTab.qml b/Modules/Settings/Tabs/AboutTab.qml index 1a4610d75..22566118e 100644 --- a/Modules/Settings/Tabs/AboutTab.qml +++ b/Modules/Settings/Tabs/AboutTab.qml @@ -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 } } diff --git a/Modules/Settings/Tabs/AudioTab.qml b/Modules/Settings/Tabs/AudioTab.qml index d15060a93..e4f704076 100644 --- a/Modules/Settings/Tabs/AudioTab.qml +++ b/Modules/Settings/Tabs/AudioTab.qml @@ -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 } diff --git a/Modules/Settings/Tabs/BarTab.qml b/Modules/Settings/Tabs/BarTab.qml index 454db34f0..31405f5c3 100644 --- a/Modules/Settings/Tabs/BarTab.qml +++ b/Modules/Settings/Tabs/BarTab.qml @@ -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 } diff --git a/Modules/Settings/Tabs/ColorSchemeTab.qml b/Modules/Settings/Tabs/ColorSchemeTab.qml index 57f3d399a..b57f0041c 100644 --- a/Modules/Settings/Tabs/ColorSchemeTab.qml +++ b/Modules/Settings/Tabs/ColorSchemeTab.qml @@ -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 diff --git a/Modules/Settings/Tabs/DisplayTab.qml b/Modules/Settings/Tabs/DisplayTab.qml index e44312858..d2f50dd2b 100644 --- a/Modules/Settings/Tabs/DisplayTab.qml +++ b/Modules/Settings/Tabs/DisplayTab.qml @@ -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 } diff --git a/Modules/Settings/Tabs/GeneralTab.qml b/Modules/Settings/Tabs/GeneralTab.qml index c5f20cc2c..45be5b9c0 100644 --- a/Modules/Settings/Tabs/GeneralTab.qml +++ b/Modules/Settings/Tabs/GeneralTab.qml @@ -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) + "%" } } } diff --git a/Modules/Settings/Tabs/LauncherTab.qml b/Modules/Settings/Tabs/LauncherTab.qml index 1a77f8806..ea9df35b1 100644 --- a/Modules/Settings/Tabs/LauncherTab.qml +++ b/Modules/Settings/Tabs/LauncherTab.qml @@ -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 diff --git a/Modules/Settings/Tabs/LocationTab.qml b/Modules/Settings/Tabs/LocationTab.qml index eafa3902f..769735d2d 100644 --- a/Modules/Settings/Tabs/LocationTab.qml +++ b/Modules/Settings/Tabs/LocationTab.qml @@ -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 diff --git a/Modules/Settings/Tabs/WallpaperTab.qml b/Modules/Settings/Tabs/WallpaperTab.qml index 742849b96..ad1ee6b16 100644 --- a/Modules/Settings/Tabs/WallpaperTab.qml +++ b/Modules/Settings/Tabs/WallpaperTab.qml @@ -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 } } diff --git a/Modules/Toast/SimpleToast.qml b/Modules/Toast/SimpleToast.qml index 2d8bdf70e..cde497ce4 100644 --- a/Modules/Toast/SimpleToast.qml +++ b/Modules/Toast/SimpleToast.qml @@ -114,7 +114,7 @@ Rectangle { Layout.fillWidth: true text: root.message color: Color.mOnSurface - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold wrapMode: Text.WordWrap visible: text.length > 0 @@ -124,7 +124,7 @@ Rectangle { Layout.fillWidth: true text: root.description color: Color.mOnSurface - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling wrapMode: Text.WordWrap visible: text.length > 0 } diff --git a/Modules/Tooltip/Tooltip.qml b/Modules/Tooltip/Tooltip.qml index 686480843..ded2b4793 100644 --- a/Modules/Tooltip/Tooltip.qml +++ b/Modules/Tooltip/Tooltip.qml @@ -386,7 +386,7 @@ PopupWindow { anchors.centerIn: parent anchors.margins: root.padding * root.scaling text: root.text - font.pointSize: Style.fontSizeS * root.scaling + pointSize: Style.fontSizeS * root.scaling color: Color.mOnSurfaceVariant horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter diff --git a/Modules/Wallpaper/WallpaperPanel.qml b/Modules/Wallpaper/WallpaperPanel.qml index 4a8f81485..1d7095b9a 100644 --- a/Modules/Wallpaper/WallpaperPanel.qml +++ b/Modules/Wallpaper/WallpaperPanel.qml @@ -58,7 +58,7 @@ NPanel { NText { text: I18n.tr("wallpaper.panel.title") - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold color: Color.mOnSurface Layout.fillWidth: true @@ -134,11 +134,11 @@ NPanel { } } - contentItem: Text { + contentItem: NText { text: parent.text - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: screenTabBar.currentIndex === index ? Style.fontWeightBold : Style.fontWeightRegular - font.family: Settings.data.ui.fontDefault + family: Settings.data.ui.fontDefault color: screenTabBar.currentIndex === index ? Color.mOnSecondary : Color.mOnSurfaceVariant horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter @@ -189,7 +189,7 @@ NPanel { NText { text: I18n.tr("wallpaper.panel.search") color: Color.mOnSurface - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling Layout.preferredWidth: implicitWidth } @@ -405,7 +405,7 @@ NPanel { text: filename color: Color.mOnSurfaceVariant opacity: 0.5 - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling Layout.fillWidth: true Layout.leftMargin: Style.marginS * scaling Layout.rightMargin: Style.marginS * scaling diff --git a/Widgets/NButton.qml b/Widgets/NButton.qml index df48655e3..d6f6335eb 100644 --- a/Widgets/NButton.qml +++ b/Widgets/NButton.qml @@ -78,7 +78,6 @@ Rectangle { NIcon { Layout.alignment: Qt.AlignVCenter visible: root.icon !== "" - icon: root.icon font.pointSize: root.iconSize color: { @@ -105,7 +104,7 @@ Rectangle { Layout.alignment: Qt.AlignVCenter visible: root.text !== "" text: root.text - font.pointSize: root.fontSize + pointSize: root.fontSize font.weight: root.fontWeight color: { if (!root.enabled) diff --git a/Widgets/NCircleStat.qml b/Widgets/NCircleStat.qml index 16e6e0a93..074ea51d2 100644 --- a/Widgets/NCircleStat.qml +++ b/Widgets/NCircleStat.qml @@ -79,7 +79,7 @@ Rectangle { id: valueLabel anchors.centerIn: parent text: `${root.value}${root.suffix}` - font.pointSize: Style.fontSizeM * scaling * contentScale + pointSize: Style.fontSizeM * scaling * contentScale font.weight: Style.fontWeightBold color: Color.mOnSurface horizontalAlignment: Text.AlignHCenter diff --git a/Widgets/NCollapsible.qml b/Widgets/NCollapsible.qml index 1403cf39f..6cc4b34bd 100644 --- a/Widgets/NCollapsible.qml +++ b/Widgets/NCollapsible.qml @@ -109,7 +109,7 @@ ColumnLayout { NText { text: root.label - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightSemiBold color: root.expanded ? Color.mOnSecondary : Color.mOnSurface Layout.fillWidth: true @@ -124,7 +124,7 @@ ColumnLayout { NText { text: root.description - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling font.weight: Style.fontWeightRegular color: root.expanded ? Color.mOnSecondary : Color.mOnSurfaceVariant Layout.fillWidth: true diff --git a/Widgets/NColorPicker.qml b/Widgets/NColorPicker.qml index 8eee16ba6..642d74a9c 100644 --- a/Widgets/NColorPicker.qml +++ b/Widgets/NColorPicker.qml @@ -58,7 +58,7 @@ Rectangle { NText { text: root.selectedColor.toString().toUpperCase() - font.family: Settings.data.ui.fontFixed + family: Settings.data.ui.fontFixed Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter } diff --git a/Widgets/NColorPickerDialog.qml b/Widgets/NColorPickerDialog.qml index 7c823444f..3165922ec 100644 --- a/Widgets/NColorPickerDialog.qml +++ b/Widgets/NColorPickerDialog.qml @@ -138,13 +138,13 @@ Popup { NIcon { icon: "color-picker" - font.pointSize: Style.fontSizeXXL * scaling + pointSize: Style.fontSizeXXL * scaling color: Color.mPrimary } NText { text: I18n.tr("widgets.color-picker.title") - font.pointSize: Style.fontSizeXL * scaling + pointSize: Style.fontSizeXL * scaling font.weight: Style.fontWeightBold color: Color.mPrimary } @@ -179,8 +179,8 @@ Popup { NText { text: root.selectedColor.toString().toUpperCase() - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeL * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeL * scaling font.weight: Font.Bold color: root.selectedColor.r + root.selectedColor.g + root.selectedColor.b > 1.5 ? "#000000" : "#FFFFFF" Layout.alignment: Qt.AlignHCenter @@ -188,8 +188,8 @@ Popup { NText { text: "RGB(" + Math.round(root.selectedColor.r * 255) + ", " + Math.round(root.selectedColor.g * 255) + ", " + Math.round(root.selectedColor.b * 255) + ")" - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeM * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeM * scaling color: root.selectedColor.r + root.selectedColor.g + root.selectedColor.b > 1.5 ? "#000000" : "#FFFFFF" Layout.alignment: Qt.AlignHCenter } diff --git a/Widgets/NComboBox.qml b/Widgets/NComboBox.qml index 6035b620e..c8d746cd8 100644 --- a/Widgets/NComboBox.qml +++ b/Widgets/NComboBox.qml @@ -89,7 +89,7 @@ RowLayout { contentItem: NText { leftPadding: Style.marginL * scaling rightPadding: combo.indicator.width + Style.marginL * scaling - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling verticalAlignment: Text.AlignVCenter elide: Text.ElideRight color: (combo.currentIndex >= 0 && combo.currentIndex < itemCount()) ? Color.mOnSurface : Color.mOnSurfaceVariant @@ -159,7 +159,7 @@ RowLayout { var item = root.getItem(index) return item && item.name ? item.name : "" } - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling color: highlighted ? Color.mOnTertiary : Color.mOnSurface verticalAlignment: Text.AlignVCenter elide: Text.ElideRight diff --git a/Widgets/NContextMenu.qml b/Widgets/NContextMenu.qml index a1b7562c4..e5bebeeed 100644 --- a/Widgets/NContextMenu.qml +++ b/Widgets/NContextMenu.qml @@ -75,7 +75,7 @@ Popup { NText { text: modelData.label || modelData.text || "" - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling color: menuItem.hovered && menuItem.enabled ? Color.mOnTertiary : Color.mOnSurface verticalAlignment: Text.AlignVCenter Layout.fillWidth: true diff --git a/Widgets/NDateTimeTokens.qml b/Widgets/NDateTimeTokens.qml index eae75d7bd..1ad1ec945 100644 --- a/Widgets/NDateTimeTokens.qml +++ b/Widgets/NDateTimeTokens.qml @@ -238,7 +238,7 @@ Rectangle { anchors.centerIn: parent text: modelData.category color: getCategoryColor(modelData.category)[1] - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling } } @@ -261,7 +261,7 @@ Rectangle { anchors.centerIn: parent text: modelData.token color: tokenMouseArea.containsMouse ? Color.mOnPrimary : Color.mSurface - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling font.weight: Style.fontWeightBold Behavior on color { @@ -278,7 +278,7 @@ Rectangle { Layout.alignment: Qt.AlignVCenter // Added this line text: modelData.description color: tokenMouseArea.containsMouse ? Color.mOnSurface : Color.mOnSurfaceVariant - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling wrapMode: Text.WordWrap Behavior on color { @@ -314,7 +314,7 @@ Rectangle { anchors.centerIn: parent text: Qt.locale().toString(root.sampleDate, modelData.token) color: tokenMouseArea.containsMouse ? Color.mOnPrimary : Color.mSurfaceVariant - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling Behavior on color { ColorAnimation { diff --git a/Widgets/NFilePicker.qml b/Widgets/NFilePicker.qml index d2e2f766d..3a9e026c5 100644 --- a/Widgets/NFilePicker.qml +++ b/Widgets/NFilePicker.qml @@ -195,7 +195,7 @@ Popup { } NText { text: root.title - font.pointSize: Style.fontSizeXL * scaling + pointSize: Style.fontSizeXL * scaling font.weight: Style.fontWeightBold color: Color.mPrimary Layout.fillWidth: true @@ -641,7 +641,7 @@ Popup { else return Color.mOnSurface } - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling font.weight: isSelected ? Style.fontWeightBold : Style.fontWeightRegular Layout.fillWidth: true horizontalAlignment: Text.AlignHCenter @@ -735,7 +735,7 @@ Popup { NText { text: model.fileName color: filePickerPanel.currentSelection.includes(model.filePath) ? Color.mOnSecondary : Color.mOnSurface - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling font.weight: filePickerPanel.currentSelection.includes(model.filePath) ? Style.fontWeightBold : Style.fontWeightRegular Layout.fillWidth: true elide: Text.ElideRight @@ -744,7 +744,7 @@ Popup { NText { text: model.fileIsDir ? "" : root.formatFileSize(model.fileSize) color: filePickerPanel.currentSelection.includes(model.filePath) ? Color.mOnSecondary : Color.mOnSurfaceVariant - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling visible: !model.fileIsDir Layout.preferredWidth: implicitWidth } @@ -810,7 +810,7 @@ Popup { } } color: filePickerPanel.searchText.length > 0 ? Color.mPrimary : Color.mOnSurfaceVariant - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling Layout.fillWidth: true } diff --git a/Widgets/NHeader.qml b/Widgets/NHeader.qml index f8bd2beb4..dfbcfd543 100644 --- a/Widgets/NHeader.qml +++ b/Widgets/NHeader.qml @@ -14,7 +14,7 @@ ColumnLayout { NText { text: root.label - font.pointSize: Style.fontSizeXL * scaling + pointSize: Style.fontSizeXL * scaling font.weight: Style.fontWeightBold color: Color.mSecondary visible: root.label !== "" @@ -22,7 +22,7 @@ ColumnLayout { NText { text: root.description - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling color: Color.mOnSurfaceVariant wrapMode: Text.WordWrap Layout.fillWidth: true diff --git a/Widgets/NIconPicker.qml b/Widgets/NIconPicker.qml index d933dfd20..813aa468a 100644 --- a/Widgets/NIconPicker.qml +++ b/Widgets/NIconPicker.qml @@ -64,7 +64,7 @@ Popup { Layout.fillWidth: true NText { text: I18n.tr("widgets.icon-picker.title") - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold color: Color.mPrimary Layout.fillWidth: true @@ -137,7 +137,7 @@ Popup { NIcon { Layout.alignment: Qt.AlignHCenter icon: modelData - font.pointSize: 42 * scaling + pointSize: 42 * scaling } NText { Layout.alignment: Qt.AlignHCenter @@ -148,7 +148,7 @@ Popup { maximumLineCount: 1 horizontalAlignment: Text.AlignHCenter color: Color.mOnSurfaceVariant - font.pointSize: Style.fontSizeXS * scaling + pointSize: Style.fontSizeXS * scaling text: modelData } Item { diff --git a/Widgets/NLabel.qml b/Widgets/NLabel.qml index c322e1641..8348fd0c0 100644 --- a/Widgets/NLabel.qml +++ b/Widgets/NLabel.qml @@ -15,7 +15,7 @@ ColumnLayout { NText { text: label - font.pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold color: labelColor visible: label !== "" @@ -24,7 +24,7 @@ ColumnLayout { NText { text: description - font.pointSize: Style.fontSizeS * scaling + pointSize: Style.fontSizeS * scaling color: descriptionColor wrapMode: Text.WordWrap visible: description !== "" diff --git a/Widgets/NRadioButton.qml b/Widgets/NRadioButton.qml index 6b71dc372..d04ea7773 100644 --- a/Widgets/NRadioButton.qml +++ b/Widgets/NRadioButton.qml @@ -41,7 +41,7 @@ RadioButton { contentItem: NText { text: root.text - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling anchors.verticalCenter: parent.verticalCenter anchors.left: outerCircle.right anchors.right: parent.right diff --git a/Widgets/NSearchableComboBox.qml b/Widgets/NSearchableComboBox.qml index e949405d2..736511a38 100644 --- a/Widgets/NSearchableComboBox.qml +++ b/Widgets/NSearchableComboBox.qml @@ -138,7 +138,7 @@ RowLayout { contentItem: NText { leftPadding: Style.marginL * scaling rightPadding: combo.indicator.width + Style.marginL * scaling - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling verticalAlignment: Text.AlignVCenter elide: Text.ElideRight color: (combo.currentIndex >= 0 && combo.currentIndex < filteredModel.count) ? Color.mOnSurface : Color.mOnSurfaceVariant @@ -206,7 +206,7 @@ RowLayout { contentItem: NText { text: name - font.pointSize: Style.fontSizeM * scaling + pointSize: Style.fontSizeM * scaling color: highlighted ? Color.mSurface : Color.mOnSurface verticalAlignment: Text.AlignVCenter elide: Text.ElideRight diff --git a/Widgets/NSpinBox.qml b/Widgets/NSpinBox.qml index 72be80d21..b84f3ec7c 100644 --- a/Widgets/NSpinBox.qml +++ b/Widgets/NSpinBox.qml @@ -284,8 +284,8 @@ RowLayout { // Prefix text (non-editable) NText { text: root.prefix - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeM * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightMedium color: Color.mOnSurface verticalAlignment: Text.AlignVCenter @@ -343,8 +343,8 @@ RowLayout { // Suffix text (non-editable) NText { text: root.suffix - font.family: Settings.data.ui.fontFixed - font.pointSize: Style.fontSizeM * scaling + family: Settings.data.ui.fontFixed + pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightMedium color: Color.mOnSurface verticalAlignment: Text.AlignVCenter diff --git a/Widgets/NText.qml b/Widgets/NText.qml index a0434821b..9efd199e5 100644 --- a/Widgets/NText.qml +++ b/Widgets/NText.qml @@ -6,9 +6,16 @@ import qs.Widgets Text { id: root - font.family: Settings.data.ui.fontDefault - font.pointSize: Style.fontSizeM * scaling + + property string family: Settings.data.ui.fontDefault + property real pointSize: Style.fontSizeM * scaling + property real fontScale: { + return (root.family === Settings.data.ui.fontDefault ? Settings.data.ui.fontDefaultScale : Settings.data.ui.fontFixedScale) + } + + font.family: root.family font.weight: Style.fontWeightMedium + font.pointSize: root.pointSize * fontScale color: Color.mOnSurface elide: Text.ElideRight wrapMode: Text.NoWrap diff --git a/Widgets/NValueSlider.qml b/Widgets/NValueSlider.qml index 981b7905a..67f6089f9 100644 --- a/Widgets/NValueSlider.qml +++ b/Widgets/NValueSlider.qml @@ -40,9 +40,9 @@ RowLayout { NText { visible: root.text !== "" text: root.text - font.family: Settings.data.ui.fontFixed + family: Settings.data.ui.fontFixed Layout.alignment: Qt.AlignVCenter - Layout.preferredWidth: 40 * scaling + Layout.preferredWidth: 50 * scaling horizontalAlignment: Text.AlignRight } }