diff --git a/Commons/Time.qml b/Commons/Time.qml index d7ec78e..0d70d26 100644 --- a/Commons/Time.qml +++ b/Commons/Time.qml @@ -9,21 +9,7 @@ Singleton { id: root property var date: new Date() - property string time: { - let timeFormat = Settings.data.location.use12HourClock ? "h:mm AP" : "HH:mm" - let timeString = Qt.formatDateTime(date, timeFormat) - if (Settings.data.location.showDateWithClock) { - let dayName = date.toLocaleDateString(Qt.locale(), "ddd") - dayName = dayName.charAt(0).toUpperCase() + dayName.slice(1) - let day = date.getDate() - let month = date.toLocaleDateString(Qt.locale(), "MMM") - - return timeString + " - " + (Settings.data.location.reverseDayMonth ? `${dayName}, ${month} ${day}` : `${dayName}, ${day} ${month}`) - } - - return timeString - } readonly property string dateString: { let now = date let dayName = now.toLocaleDateString(Qt.locale(), "ddd") diff --git a/Modules/SettingsPanel/SettingsPanel.qml b/Modules/SettingsPanel/SettingsPanel.qml index 8bfbe77..ea8c701 100644 --- a/Modules/SettingsPanel/SettingsPanel.qml +++ b/Modules/SettingsPanel/SettingsPanel.qml @@ -39,7 +39,7 @@ NPanel { General, Network, ScreenRecorder, - TimeWeather, + Weather, Wallpaper, WallpaperSelector } @@ -90,8 +90,8 @@ NPanel { Tabs.NetworkTab {} } Component { - id: timeWeatherTab - Tabs.TimeWeatherTab {} + id: weatherTab + Tabs.WeatherTab {} } Component { id: colorSchemeTab @@ -156,10 +156,10 @@ NPanel { "icon": "brightness_6", "source": brightnessTab }, { - "id": SettingsPanel.Tab.TimeWeather, - "label": "Time & Weather", - "icon": "schedule", - "source": timeWeatherTab + "id": SettingsPanel.Tab.Weather, + "label": "Weather", + "icon": "partly_cloudy_day", + "source": weatherTab }, { "id": SettingsPanel.Tab.ColorScheme, "label": "Color Scheme", diff --git a/Modules/SettingsPanel/Tabs/TimeWeatherTab.qml b/Modules/SettingsPanel/Tabs/WeatherTab.qml similarity index 65% rename from Modules/SettingsPanel/Tabs/TimeWeatherTab.qml rename to Modules/SettingsPanel/Tabs/WeatherTab.qml index 2fa89dd..7553158 100644 --- a/Modules/SettingsPanel/Tabs/TimeWeatherTab.qml +++ b/Modules/SettingsPanel/Tabs/WeatherTab.qml @@ -52,46 +52,6 @@ ColumnLayout { Layout.bottomMargin: Style.marginXL * scaling } - // Time section - ColumnLayout { - spacing: Style.marginL * scaling - Layout.fillWidth: true - - NText { - text: "Time Format" - font.pointSize: Style.fontSizeXXL * scaling - font.weight: Style.fontWeightBold - color: Color.mSecondary - } - - NToggle { - label: "Use 12-Hour Clock" - description: "Display time in 12-hour format (AM/PM) instead of 24-hour." - checked: Settings.data.location.use12HourClock - onToggled: checked => Settings.data.location.use12HourClock = checked - } - - NToggle { - label: "Reverse Day/Month" - description: "Display date as dd/mm instead of mm/dd." - checked: Settings.data.location.reverseDayMonth - onToggled: checked => Settings.data.location.reverseDayMonth = checked - } - - NToggle { - label: "Show Date with Clock" - description: "Display date alongside time (e.g., 18:12 - Sat, 23 Aug)." - checked: Settings.data.location.showDateWithClock - onToggled: checked => Settings.data.location.showDateWithClock = checked - } - } - - NDivider { - Layout.fillWidth: true - Layout.topMargin: Style.marginXL * scaling - Layout.bottomMargin: Style.marginXL * scaling - } - // Weather section ColumnLayout { spacing: Style.marginM * scaling