mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Clock: removed useMonospacedFont to keep things simple, + translations + cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -237,7 +237,6 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ColumnLayout {
|
||||
NLabel {
|
||||
label: I18n.tr("settings.general.fonts.default.scale.label")
|
||||
|
||||
Reference in New Issue
Block a user