Location/Clock: Moved use12hourformat and reverseDaymonth from the clock widget settings to the main settings, location tab

- Fix #303
This commit is contained in:
LemmyCook
2025-09-17 21:10:51 -04:00
parent 85d7dc2506
commit 47f72d9498
9 changed files with 77 additions and 87 deletions
@@ -15,14 +15,10 @@ ColumnLayout {
// Local state
property string valueDisplayFormat: widgetData.displayFormat !== undefined ? widgetData.displayFormat : widgetMetadata.displayFormat
property bool valueUse12h: widgetData.use12HourClock !== undefined ? widgetData.use12HourClock : widgetMetadata.use12HourClock
property bool valueReverseDayMonth: widgetData.reverseDayMonth !== undefined ? widgetData.reverseDayMonth : widgetMetadata.reverseDayMonth
function saveSettings() {
var settings = Object.assign({}, widgetData || {})
settings.displayFormat = valueDisplayFormat
settings.use12HourClock = valueUse12h
settings.reverseDayMonth = valueReverseDayMonth
return settings
}
@@ -50,16 +46,4 @@ ColumnLayout {
onSelected: key => valueDisplayFormat = key
minimumWidth: 230 * scaling
}
NToggle {
label: "Use 12-hour clock"
checked: valueUse12h
onToggled: checked => valueUse12h = checked
}
NToggle {
label: "Reverse day and month"
checked: valueReverseDayMonth
onToggled: checked => valueReverseDayMonth = checked
}
}