diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 81ccc408..3791ae2a 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -1030,7 +1030,17 @@ "label": "Vertikale Statusleiste", "description": "Verwenden Sie ein Leerzeichen, um jeden Teil in eine neue Zeile zu trennen." }, - "preview": "Vorschau" + "preview": "Vorschau", + "custom-font": { + "description": "Wähle eine benutzerdefinierte Schriftart für die Uhrenanzeige aus.", + "label": "Benutzerdefinierte Schriftart", + "placeholder": "Benutzerdefinierte Schriftart auswählen...", + "search-placeholder": "Schriftarten suchen..." + }, + "use-custom-font": { + "description": "Überschreibe die Standard-Schriftauswahl mit einer benutzerdefinierten Schriftart für die Uhr.", + "label": "Benutzerdefinierte Schriftart verwenden" + } }, "taskbar": { "only-active-workspaces": { diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index 454fd36b..13ced157 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -1009,7 +1009,17 @@ "label": "Barra vertical", "description": "Usa un espacio para separar cada parte en una nueva línea." }, - "preview": "Vista previa" + "preview": "Vista previa", + "custom-font": { + "description": "Seleccionar una fuente personalizada para la visualización del reloj.", + "label": "Fuente personalizada", + "placeholder": "Seleccionar fuente personalizada...", + "search-placeholder": "Buscar fuentes..." + }, + "use-custom-font": { + "description": "Anular la selección de fuente predeterminada con una fuente personalizada para el reloj.", + "label": "Usar fuente personalizada" + } }, "taskbar": { "only-active-workspaces": { diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 56dbed4e..dabb0761 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -1009,7 +1009,17 @@ "label": "Barre verticale", "description": "Utilisez un espace pour séparer chaque partie sur une nouvelle ligne." }, - "preview": "Aperçu" + "preview": "Aperçu", + "custom-font": { + "description": "Sélectionner une police personnalisée pour l'affichage de l'horloge.", + "label": "Police personnalisée", + "placeholder": "Sélectionner une police personnalisée...", + "search-placeholder": "Rechercher des polices..." + }, + "use-custom-font": { + "description": "Remplacez la police par défaut par une police personnalisée pour l'horloge.", + "label": "Utiliser une police personnalisée." + } }, "taskbar": { "only-active-workspaces": { diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index dac9c490..6b00b036 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -1009,7 +1009,17 @@ "label": "Barra vertical", "description": "Use um espaço para separar cada parte em uma nova linha." }, - "preview": "Pré-visualização" + "preview": "Pré-visualização", + "custom-font": { + "description": "Selecione uma fonte personalizada para a exibição do relógio.", + "label": "Fonte personalizada", + "placeholder": "Selecionar fonte personalizada...", + "search-placeholder": "Procurar fontes..." + }, + "use-custom-font": { + "description": "Substitua a fonte padrão por uma fonte personalizada para o relógio.", + "label": "Usar fonte personalizada" + } }, "taskbar": { "only-active-workspaces": { diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 7859beff..c0f12485 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -1009,7 +1009,17 @@ "label": "垂直栏", "description": "使用空格将每个部分分隔到新行。" }, - "preview": "预览" + "preview": "预览", + "custom-font": { + "description": "选择时钟显示使用的自定义字体。", + "label": "自定义字体", + "placeholder": "选择自定义字体...", + "search-placeholder": "搜索字体..." + }, + "use-custom-font": { + "description": "使用自定义字体覆盖时钟的默认字体选择。", + "label": "使用自定义字体" + } }, "taskbar": { "only-active-workspaces": { diff --git a/Modules/Bar/Widgets/Clock.qml b/Modules/Bar/Widgets/Clock.qml index 26b40617..0167d83f 100644 --- a/Modules/Bar/Widgets/Clock.qml +++ b/Modules/Bar/Widgets/Clock.qml @@ -36,7 +36,6 @@ Rectangle { // Resolve settings: try user settings or defaults from BarWidgetRegistry readonly property bool usePrimaryColor: widgetSettings.usePrimaryColor !== undefined ? widgetSettings.usePrimaryColor : widgetMetadata.usePrimaryColor - property bool useMonospacedFont: widgetSettings.useMonospacedFont !== undefined ? widgetSettings.useMonospacedFont : widgetMetadata.useMonospacedFont readonly property bool useCustomFont: widgetSettings.useCustomFont !== undefined ? widgetSettings.useCustomFont : widgetMetadata.useCustomFont readonly property string customFont: widgetSettings.customFont !== undefined ? widgetSettings.customFont : widgetMetadata.customFont readonly property string formatHorizontal: widgetSettings.formatHorizontal !== undefined ? widgetSettings.formatHorizontal : widgetMetadata.formatHorizontal @@ -67,7 +66,7 @@ Rectangle { NText { visible: text !== "" text: modelData - family: useCustomFont && customFont ? customFont : (useMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault) + family: useCustomFont && customFont ? customFont : Settings.data.ui.fontDefault pointSize: { if (repeater.model.length == 1) { return Style.fontSizeS * scaling @@ -97,7 +96,7 @@ Rectangle { delegate: NText { visible: text !== "" text: modelData - family: useCustomFont && customFont ? customFont : (useMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault) + family: useCustomFont && customFont ? customFont : Settings.data.ui.fontDefault pointSize: Style.fontSizeS * scaling font.weight: Style.fontWeightBold color: usePrimaryColor ? Color.mPrimary : Color.mOnSurface diff --git a/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml b/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml index 025d6f28..177bd367 100644 --- a/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml @@ -16,7 +16,6 @@ ColumnLayout { // Local state property bool valueUsePrimaryColor: widgetData.usePrimaryColor !== undefined ? widgetData.usePrimaryColor : widgetMetadata.usePrimaryColor - property bool valueUseMonospacedFont: widgetData.useMonospacedFont !== undefined ? widgetData.useMonospacedFont : widgetMetadata.useMonospacedFont property bool valueUseCustomFont: widgetData.useCustomFont !== undefined ? widgetData.useCustomFont : widgetMetadata.useCustomFont property string valueCustomFont: widgetData.customFont !== undefined ? widgetData.customFont : widgetMetadata.customFont property string valueFormatHorizontal: widgetData.formatHorizontal !== undefined ? widgetData.formatHorizontal : widgetMetadata.formatHorizontal @@ -31,7 +30,6 @@ ColumnLayout { function saveSettings() { var settings = Object.assign({}, widgetData || {}) settings.usePrimaryColor = valueUsePrimaryColor - settings.useMonospacedFont = valueUseMonospacedFont settings.useCustomFont = valueUseCustomFont settings.customFont = valueCustomFont settings.formatHorizontal = valueFormatHorizontal.trim() @@ -74,14 +72,6 @@ ColumnLayout { onToggled: checked => valueUsePrimaryColor = checked } - NToggle { - Layout.fillWidth: true - label: I18n.tr("bar.widget-settings.clock.use-monospaced-font.label") - description: I18n.tr("bar.widget-settings.clock.use-monospaced-font.description") - checked: valueUseMonospacedFont - onToggled: checked => valueUseMonospacedFont = checked - } - NToggle { Layout.fillWidth: true label: I18n.tr("bar.widget-settings.clock.use-custom-font.label") diff --git a/Modules/Settings/Tabs/GeneralTab.qml b/Modules/Settings/Tabs/GeneralTab.qml index cba95fc6..405a5cd9 100644 --- a/Modules/Settings/Tabs/GeneralTab.qml +++ b/Modules/Settings/Tabs/GeneralTab.qml @@ -237,7 +237,6 @@ ColumnLayout { } } - ColumnLayout { NLabel { label: I18n.tr("settings.general.fonts.default.scale.label") diff --git a/Services/BarWidgetRegistry.qml b/Services/BarWidgetRegistry.qml index 04e6af90..598817c8 100644 --- a/Services/BarWidgetRegistry.qml +++ b/Services/BarWidgetRegistry.qml @@ -56,7 +56,6 @@ Singleton { "Clock": { "allowUserSettings": true, "usePrimaryColor": true, - "useMonospacedFont": true, "useCustomFont": false, "customFont": "", "formatHorizontal": "HH:mm ddd, MMM dd", diff --git a/Services/BrightnessService.qml b/Services/BrightnessService.qml index 13dba7f7..24565be0 100644 --- a/Services/BrightnessService.qml +++ b/Services/BrightnessService.qml @@ -155,9 +155,7 @@ Singleton { function refreshBrightnessFromSystem() { if (!monitor.isDdc && !monitor.isAppleDisplay) { // For internal displays, query the system directly - refreshProc.command = ["sh", "-c", - "cat " + monitor.brightnessPath + " && " + - "cat " + monitor.maxBrightnessPath] + refreshProc.command = ["sh", "-c", "cat " + monitor.brightnessPath + " && " + "cat " + monitor.maxBrightnessPath] refreshProc.running = true } else if (monitor.isDdc) { // For DDC displays, get the current value @@ -179,7 +177,7 @@ Singleton { onFileChanged: { // When a file change is detected, actively refresh from system // to ensure we get the most up-to-date value - Qt.callLater(function() { + Qt.callLater(() => { monitor.refreshBrightnessFromSystem() }) }