mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 02:23:23 +00:00
Location/Clock: Moved use12hourformat and reverseDaymonth from the clock widget settings to the main settings, location tab
- Fix #303
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,16 +26,16 @@ NPanel {
|
||||
About,
|
||||
Audio,
|
||||
Bar,
|
||||
Dock,
|
||||
Hooks,
|
||||
Launcher,
|
||||
ColorScheme,
|
||||
Display,
|
||||
Dock,
|
||||
General,
|
||||
Hooks,
|
||||
Launcher,
|
||||
Location,
|
||||
Network,
|
||||
Notification,
|
||||
ScreenRecorder,
|
||||
Weather,
|
||||
Wallpaper,
|
||||
WallpaperSelector
|
||||
}
|
||||
@@ -81,8 +81,8 @@ NPanel {
|
||||
Tabs.NetworkTab {}
|
||||
}
|
||||
Component {
|
||||
id: weatherTab
|
||||
Tabs.WeatherTab {}
|
||||
id: locationTab
|
||||
Tabs.LocationTab {}
|
||||
}
|
||||
Component {
|
||||
id: colorSchemeTab
|
||||
@@ -160,10 +160,10 @@ NPanel {
|
||||
"icon": "settings-network",
|
||||
"source": networkTab
|
||||
}, {
|
||||
"id": SettingsPanel.Tab.Weather,
|
||||
"label": "Weather",
|
||||
"icon": "settings-weather",
|
||||
"source": weatherTab
|
||||
"id": SettingsPanel.Tab.Location,
|
||||
"label": "Location",
|
||||
"icon": "settings-location",
|
||||
"source": locationTab
|
||||
}, {
|
||||
"id": SettingsPanel.Tab.ColorScheme,
|
||||
"label": "Color Scheme",
|
||||
|
||||
+32
-1
@@ -65,7 +65,7 @@ ColumnLayout {
|
||||
|
||||
NHeader {
|
||||
label: "Weather"
|
||||
description: "Configure weather display preferences and temperature units."
|
||||
description: "Configure temperature units."
|
||||
}
|
||||
|
||||
NToggle {
|
||||
@@ -81,4 +81,35 @@ ColumnLayout {
|
||||
Layout.topMargin: Style.marginXL * scaling
|
||||
Layout.bottomMargin: Style.marginXL * scaling
|
||||
}
|
||||
|
||||
// Weather section
|
||||
ColumnLayout {
|
||||
spacing: Style.marginM * scaling
|
||||
Layout.fillWidth: true
|
||||
|
||||
NHeader {
|
||||
label: "Time & Date"
|
||||
description: "Configure time and date formats."
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Use 12-hour time format"
|
||||
description: "Classic AM/PM or modern 24-hour."
|
||||
checked: Settings.data.location.use12hourFormat
|
||||
onToggled: checked => Settings.data.location.use12hourFormat = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Show Month Before Day"
|
||||
description: "Organize your dates. On for 09/17/2025, off for 17/09/2025."
|
||||
checked: Settings.data.location.monthBeforeDay
|
||||
onToggled: checked => Settings.data.location.monthBeforeDay = checked
|
||||
}
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginXL * scaling
|
||||
Layout.bottomMargin: Style.marginXL * scaling
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user