From 586e28919cd3dcde036470265e660b97ed31d6ff Mon Sep 17 00:00:00 2001 From: Corey Woodworth Date: Fri, 10 Oct 2025 22:14:57 -0400 Subject: [PATCH 01/10] fix: Alignment issue on current day vs other days --- Modules/Bar/Calendar/CalendarPanel.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index 21246815..0d1faade 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -87,15 +87,17 @@ NPanel { // Today day number NText { - visible: content.isCurrentMonth + opacity: content.isCurrentMonth ? 1.0 : 0.0 + Layout.preferredWidth: content.isCurrentMonth ? implicitWidth : 0 Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft text: Time.date.getDate() pointSize: Style.fontSizeXXXL * 1.5 * scaling font.weight: Style.fontWeightBold color: Color.mOnPrimary - } - Item { - visible: !content.isCurrentMonth + + Behavior on opacity { + NumberAnimation { duration: Style.animationFast } + } } // Month, year, location From e07e7e2bd14a640cc9404079b3cd007de3e7c424 Mon Sep 17 00:00:00 2001 From: Corey Woodworth Date: Fri, 10 Oct 2025 23:34:56 -0400 Subject: [PATCH 02/10] fix: Refine header layout and animations --- Modules/Bar/Calendar/CalendarPanel.qml | 220 +++++++++++-------------- 1 file changed, 92 insertions(+), 128 deletions(-) diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index 0d1faade..70a2fa74 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -43,14 +43,20 @@ NPanel { ColumnLayout { id: blueColumn - anchors.fill: parent - anchors.margins: Style.marginM * scaling + anchors.top: parent.top + anchors.left: parent.left + anchors.bottom: parent.bottom + anchors.topMargin: Style.marginM * scaling + anchors.leftMargin: Style.marginM * scaling + anchors.bottomMargin: Style.marginM * scaling + anchors.rightMargin: clockItem.width + (Style.marginM * scaling * 2) spacing: 0 // Combined layout for weather icon, date, and weather text RowLayout { Layout.fillWidth: true - Layout.preferredHeight: 60 * scaling + height: 60 * scaling + clip: true spacing: Style.marginS * scaling // Weather icon and temperature @@ -70,14 +76,14 @@ NPanel { text: { if (!weatherReady) return "" - var temp = LocationService.data.weather.current_weather.temperature - var suffix = "C" - if (Settings.data.location.useFahrenheit) { - temp = LocationService.celsiusToFahrenheit(temp) - suffix = "F" - } - temp = Math.round(temp) - return `${temp}°${suffix}` + var temp = LocationService.data.weather.current_weather.temperature + var suffix = "C" + if (Settings.data.location.useFahrenheit) { + temp = LocationService.celsiusToFahrenheit(temp) + suffix = "F" + } + temp = Math.round(temp) + return `${temp}°${suffix}` } pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightBold @@ -85,24 +91,27 @@ NPanel { } } - // Today day number + // Today day number - with simple, stable animation NText { opacity: content.isCurrentMonth ? 1.0 : 0.0 Layout.preferredWidth: content.isCurrentMonth ? implicitWidth : 0 + elide: Text.ElideNone + clip: true + Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft text: Time.date.getDate() pointSize: Style.fontSizeXXXL * 1.5 * scaling font.weight: Style.fontWeightBold color: Color.mOnPrimary - Behavior on opacity { - NumberAnimation { duration: Style.animationFast } - } + Behavior on opacity { NumberAnimation { duration: Style.animationFast } } + Behavior on Layout.preferredWidth { NumberAnimation { duration: Style.animationFast; easing.type: Easing.InOutQuad } } } // Month, year, location ColumnLayout { - Layout.fillWidth: false + // Give the whole column a fixed width to stabilize the layout + Layout.preferredWidth: 170 * scaling Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft spacing: -Style.marginXS * scaling @@ -115,7 +124,6 @@ NPanel { font.weight: Style.fontWeightBold color: Color.mOnPrimary Layout.alignment: Qt.AlignBaseline - Layout.maximumWidth: 150 * scaling elide: Text.ElideRight } @@ -135,8 +143,8 @@ NPanel { text: { if (!weatherReady) return I18n.tr("calendar.weather.loading") - const chunks = Settings.data.location.name.split(",") - return chunks[0] + const chunks = Settings.data.location.name.split(",") + return chunks[0] } pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightMedium @@ -154,96 +162,86 @@ NPanel { } } - // Spacer between date and clock + // Spacer to push content left Item { Layout.fillWidth: true } + } + } - // Digital clock with circular progress - Item { - width: Style.fontSizeXXXL * 1.9 * scaling - height: Style.fontSizeXXXL * 1.9 * scaling - Layout.alignment: Qt.AlignVCenter + // The Clock, anchored separately for stability + Item { + id: clockItem + anchors.right: parent.right + anchors.rightMargin: Style.marginM * scaling + anchors.verticalCenter: parent.verticalCenter + width: Style.fontSizeXXXL * 1.9 * scaling + height: Style.fontSizeXXXL * 1.9 * scaling - // Seconds circular progress - Canvas { - id: secondsProgress - anchors.fill: parent - - property real progress: Time.date.getSeconds() / 60 - onProgressChanged: requestPaint() - - Connections { - target: Time - function onDateChanged() { - const total = Time.date.getSeconds() * 1000 + Time.date.getMilliseconds() - secondsProgress.progress = total / 60000 - } - } - - onPaint: { - var ctx = getContext("2d") - var centerX = width / 2 - var centerY = height / 2 - var radius = Math.min(width, height) / 2 - 3 * scaling - - ctx.reset() - - // Background circle - ctx.beginPath() - ctx.arc(centerX, centerY, radius, 0, 2 * Math.PI) - ctx.lineWidth = 2.5 * scaling - ctx.strokeStyle = Qt.alpha(Color.mOnPrimary, 0.15) - ctx.stroke() - - // Progress arc - ctx.beginPath() - ctx.arc(centerX, centerY, radius, -Math.PI / 2, -Math.PI / 2 + progress * 2 * Math.PI) - ctx.lineWidth = 2.5 * scaling - ctx.strokeStyle = Color.mOnPrimary - ctx.lineCap = "round" - ctx.stroke() - } + Canvas { + id: secondsProgress + anchors.fill: parent + property real progress: Time.date.getSeconds() / 60 + onProgressChanged: requestPaint() + Connections { + target: Time + function onDateChanged() { + const total = Time.date.getSeconds() * 1000 + Time.date.getMilliseconds() + secondsProgress.progress = total / 60000 } + } + onPaint: { + var ctx = getContext("2d") + var centerX = width / 2 + var centerY = height / 2 + var radius = Math.min(width, height) / 2 - 3 * scaling + ctx.reset() + ctx.beginPath() + ctx.arc(centerX, centerY, radius, 0, 2 * Math.PI) + ctx.lineWidth = 2.5 * scaling + ctx.strokeStyle = Qt.alpha(Color.mOnPrimary, 0.15) + ctx.stroke() + ctx.beginPath() + ctx.arc(centerX, centerY, radius, -Math.PI / 2, -Math.PI / 2 + progress * 2 * Math.PI) + ctx.lineWidth = 2.5 * scaling + ctx.strokeStyle = Color.mOnPrimary + ctx.lineCap = "round" + ctx.stroke() + } + } - // Digital clock - ColumnLayout { - anchors.centerIn: parent - spacing: -Style.marginXXS * scaling - - NText { - text: { - var t = Settings.data.location.use12hourFormat ? Qt.locale().toString(new Date(), "hh AP") : Qt.locale().toString(new Date(), "HH") - return t.split(" ")[0] - } - pointSize: Style.fontSizeXS * scaling - font.weight: Style.fontWeightBold - color: Color.mOnPrimary - family: Settings.data.ui.fontFixed - Layout.alignment: Qt.AlignHCenter - } - - NText { - text: Qt.formatTime(Time.date, "mm") - pointSize: Style.fontSizeXXS * scaling - font.weight: Style.fontWeightBold - color: Color.mOnPrimary - family: Settings.data.ui.fontFixed - Layout.alignment: Qt.AlignHCenter - } + ColumnLayout { + anchors.centerIn: parent + spacing: -Style.marginXXS * scaling + NText { + text: { + var t = Settings.data.location.use12hourFormat ? Qt.locale().toString(new Date(), "hh AP") : Qt.locale().toString(new Date(), "HH") + return t.split(" ")[0] } + pointSize: Style.fontSizeXS * scaling + font.weight: Style.fontWeightBold + color: Color.mOnPrimary + family: Settings.data.ui.fontFixed + Layout.alignment: Qt.AlignHCenter + } + NText { + text: Qt.formatTime(Time.date, "mm") + pointSize: Style.fontSizeXXS * scaling + font.weight: Style.fontWeightBold + color: Color.mOnPrimary + family: Settings.data.ui.fontFixed + Layout.alignment: Qt.AlignHCenter } } } } - // 6-day forecast (outside blue banner) + // ... (rest of the file is unchanged) ... RowLayout { visible: weatherReady Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter spacing: Style.marginL * scaling - Repeater { model: weatherReady ? Math.min(6, LocationService.data.weather.daily.time.length) : 0 delegate: ColumnLayout { @@ -251,7 +249,6 @@ NPanel { Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter spacing: Style.marginS * scaling - NText { text: { var weatherDate = new Date(LocationService.data.weather.daily.time[index].replace(/-/g, "/")) @@ -262,14 +259,12 @@ NPanel { font.weight: Style.fontWeightMedium Layout.alignment: Qt.AlignHCenter } - NIcon { Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter icon: LocationService.weatherSymbolFromCode(LocationService.data.weather.daily.weathercode[index]) pointSize: Style.fontSizeXXL * 1.5 * scaling color: Color.mPrimary } - NText { Layout.alignment: Qt.AlignHCenter text: { @@ -290,27 +285,19 @@ NPanel { } } } - - // Loading indicator for weather RowLayout { visible: !weatherReady Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter NBusyIndicator {} } - - // Spacer Item {} - - // Navigation and divider RowLayout { Layout.fillWidth: true spacing: Style.marginS * scaling - NDivider { Layout.fillWidth: true } - NIconButton { icon: "chevron-left" onClicked: { @@ -320,7 +307,6 @@ NPanel { content.isCurrentMonth = content.checkIsCurrentMonth() } } - NIconButton { icon: "calendar" onClicked: { @@ -329,7 +315,6 @@ NPanel { content.isCurrentMonth = true } } - NIconButton { icon: "chevron-right" onClicked: { @@ -340,31 +325,24 @@ NPanel { } } } - - // Names of days of the week RowLayout { Layout.fillWidth: true spacing: 0 - Item { visible: Settings.data.location.showWeekNumberInCalendar Layout.preferredWidth: visible ? Style.baseWidgetSize * 0.7 * scaling : 0 } - GridLayout { Layout.fillWidth: true columns: 7 rows: 1 columnSpacing: 0 rowSpacing: 0 - Repeater { model: 7 - Item { Layout.fillWidth: true Layout.preferredHeight: Style.baseWidgetSize * 0.6 * scaling - NText { anchors.centerIn: parent text: { @@ -381,27 +359,20 @@ NPanel { } } } - - // Grid with weeks and days RowLayout { Layout.fillWidth: true Layout.fillHeight: true spacing: 0 - - // Column of week numbers ColumnLayout { visible: Settings.data.location.showWeekNumberInCalendar Layout.preferredWidth: visible ? Style.baseWidgetSize * 0.7 * scaling : 0 Layout.fillHeight: true spacing: 0 - Repeater { model: 6 - Item { Layout.fillWidth: true Layout.fillHeight: true - NText { anchors.centerIn: parent color: Color.mOutline @@ -433,42 +404,35 @@ NPanel { } } } - - // Days Grid MonthGrid { id: grid - Layout.fillWidth: true Layout.fillHeight: true spacing: Style.marginXXS * scaling month: Time.date.getMonth() year: Time.date.getFullYear() locale: Qt.locale() - delegate: Item { Rectangle { width: Style.baseWidgetSize * 0.9 * scaling height: Style.baseWidgetSize * 0.9 * scaling anchors.centerIn: parent radius: Style.radiusM * scaling - color: model.today ? Color.mSecondary : Color.transparent - NText { anchors.centerIn: parent text: model.day color: { if (model.today) return Color.mOnSecondary - if (model.month === grid.month) - return Color.mOnSurface - return Color.mOnSurfaceVariant + if (model.month === grid.month) + return Color.mOnSurface + return Color.mOnSurfaceVariant } opacity: model.month === grid.month ? 1.0 : 0.4 pointSize: Style.fontSizeM * scaling font.weight: model.today ? Style.fontWeightBold : Style.fontWeightMedium } - Behavior on color { ColorAnimation { duration: Style.animationFast From ee799df56d4dca60616a4862215d242fd1225193 Mon Sep 17 00:00:00 2001 From: MrDowntempo Date: Fri, 10 Oct 2025 23:56:17 -0400 Subject: [PATCH 03/10] Just some clean up and restored comments --- Modules/Bar/Calendar/CalendarPanel.qml | 48 +++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index 70a2fa74..c0617865 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -91,7 +91,7 @@ NPanel { } } - // Today day number - with simple, stable animation + // Today day number NText { opacity: content.isCurrentMonth ? 1.0 : 0.0 Layout.preferredWidth: content.isCurrentMonth ? implicitWidth : 0 @@ -110,7 +110,6 @@ NPanel { // Month, year, location ColumnLayout { - // Give the whole column a fixed width to stabilize the layout Layout.preferredWidth: 170 * scaling Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft spacing: -Style.marginXS * scaling @@ -169,7 +168,7 @@ NPanel { } } - // The Clock, anchored separately for stability + // Digital clock with circular progress Item { id: clockItem anchors.right: parent.right @@ -178,6 +177,7 @@ NPanel { width: Style.fontSizeXXXL * 1.9 * scaling height: Style.fontSizeXXXL * 1.9 * scaling + // Seconds circular progress Canvas { id: secondsProgress anchors.fill: parent @@ -196,11 +196,15 @@ NPanel { var centerY = height / 2 var radius = Math.min(width, height) / 2 - 3 * scaling ctx.reset() + + // Background circle ctx.beginPath() ctx.arc(centerX, centerY, radius, 0, 2 * Math.PI) ctx.lineWidth = 2.5 * scaling ctx.strokeStyle = Qt.alpha(Color.mOnPrimary, 0.15) ctx.stroke() + + // Progress arc ctx.beginPath() ctx.arc(centerX, centerY, radius, -Math.PI / 2, -Math.PI / 2 + progress * 2 * Math.PI) ctx.lineWidth = 2.5 * scaling @@ -210,6 +214,7 @@ NPanel { } } + // Digital clock ColumnLayout { anchors.centerIn: parent spacing: -Style.marginXXS * scaling @@ -236,12 +241,13 @@ NPanel { } } - // ... (rest of the file is unchanged) ... + // 6-day forecast (outside blue banner) RowLayout { visible: weatherReady Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter spacing: Style.marginL * scaling + Repeater { model: weatherReady ? Math.min(6, LocationService.data.weather.daily.time.length) : 0 delegate: ColumnLayout { @@ -249,6 +255,7 @@ NPanel { Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter spacing: Style.marginS * scaling + NText { text: { var weatherDate = new Date(LocationService.data.weather.daily.time[index].replace(/-/g, "/")) @@ -259,12 +266,14 @@ NPanel { font.weight: Style.fontWeightMedium Layout.alignment: Qt.AlignHCenter } + NIcon { Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter icon: LocationService.weatherSymbolFromCode(LocationService.data.weather.daily.weathercode[index]) pointSize: Style.fontSizeXXL * 1.5 * scaling color: Color.mPrimary } + NText { Layout.alignment: Qt.AlignHCenter text: { @@ -285,19 +294,27 @@ NPanel { } } } + + // Loading indicator for weather RowLayout { visible: !weatherReady Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter NBusyIndicator {} } + + // Spacer Item {} + + // Navigation and divider RowLayout { Layout.fillWidth: true spacing: Style.marginS * scaling + NDivider { Layout.fillWidth: true } + NIconButton { icon: "chevron-left" onClicked: { @@ -307,6 +324,7 @@ NPanel { content.isCurrentMonth = content.checkIsCurrentMonth() } } + NIconButton { icon: "calendar" onClicked: { @@ -315,6 +333,7 @@ NPanel { content.isCurrentMonth = true } } + NIconButton { icon: "chevron-right" onClicked: { @@ -325,24 +344,31 @@ NPanel { } } } + + // Names of days of the week RowLayout { Layout.fillWidth: true spacing: 0 + Item { visible: Settings.data.location.showWeekNumberInCalendar Layout.preferredWidth: visible ? Style.baseWidgetSize * 0.7 * scaling : 0 } + GridLayout { Layout.fillWidth: true columns: 7 rows: 1 columnSpacing: 0 rowSpacing: 0 + Repeater { model: 7 + Item { Layout.fillWidth: true Layout.preferredHeight: Style.baseWidgetSize * 0.6 * scaling + NText { anchors.centerIn: parent text: { @@ -359,20 +385,27 @@ NPanel { } } } + + // Grid with weeks and days RowLayout { Layout.fillWidth: true Layout.fillHeight: true spacing: 0 + + // Column of week numbers ColumnLayout { visible: Settings.data.location.showWeekNumberInCalendar Layout.preferredWidth: visible ? Style.baseWidgetSize * 0.7 * scaling : 0 Layout.fillHeight: true spacing: 0 + Repeater { model: 6 + Item { Layout.fillWidth: true Layout.fillHeight: true + NText { anchors.centerIn: parent color: Color.mOutline @@ -404,21 +437,27 @@ NPanel { } } } + + // Days Grid MonthGrid { id: grid + Layout.fillWidth: true Layout.fillHeight: true spacing: Style.marginXXS * scaling month: Time.date.getMonth() year: Time.date.getFullYear() locale: Qt.locale() + delegate: Item { Rectangle { width: Style.baseWidgetSize * 0.9 * scaling height: Style.baseWidgetSize * 0.9 * scaling anchors.centerIn: parent radius: Style.radiusM * scaling + color: model.today ? Color.mSecondary : Color.transparent + NText { anchors.centerIn: parent text: model.day @@ -433,6 +472,7 @@ NPanel { pointSize: Style.fontSizeM * scaling font.weight: model.today ? Style.fontWeightBold : Style.fontWeightMedium } + Behavior on color { ColorAnimation { duration: Style.animationFast From 0b928b0e1d4760a85babbe6f88392c838a00f0bc Mon Sep 17 00:00:00 2001 From: MrDowntempo Date: Sat, 11 Oct 2025 00:02:50 -0400 Subject: [PATCH 04/10] Deleted some spaces some final cleanup --- Modules/Bar/Calendar/CalendarPanel.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index c0617865..5ea0585e 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -391,7 +391,7 @@ NPanel { Layout.fillWidth: true Layout.fillHeight: true spacing: 0 - + // Column of week numbers ColumnLayout { visible: Settings.data.location.showWeekNumberInCalendar From 6d83a3ebed0ac6c8ec70a2419b21ca9858f1458c Mon Sep 17 00:00:00 2001 From: MrDowntempo Date: Sat, 11 Oct 2025 00:43:06 -0400 Subject: [PATCH 05/10] Indentation fixes Should be all cleaned up and ready to go --- Modules/Bar/Calendar/CalendarPanel.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index 5ea0585e..9f0b0172 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -142,8 +142,8 @@ NPanel { text: { if (!weatherReady) return I18n.tr("calendar.weather.loading") - const chunks = Settings.data.location.name.split(",") - return chunks[0] + const chunks = Settings.data.location.name.split(",") + return chunks[0] } pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightMedium @@ -464,9 +464,9 @@ NPanel { color: { if (model.today) return Color.mOnSecondary - if (model.month === grid.month) - return Color.mOnSurface - return Color.mOnSurfaceVariant + if (model.month === grid.month) + return Color.mOnSurface + return Color.mOnSurfaceVariant } opacity: model.month === grid.month ? 1.0 : 0.4 pointSize: Style.fontSizeM * scaling From 4fb884a5c683f8705b0b980510c44bdb2944b5ea Mon Sep 17 00:00:00 2001 From: Corey Woodworth Date: Sat, 11 Oct 2025 02:09:51 -0400 Subject: [PATCH 06/10] fix: fine tune vertical centering and ensure room for long month names --- Modules/Bar/Calendar/CalendarPanel.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index 9f0b0172..8ae325b2 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -112,6 +112,8 @@ NPanel { ColumnLayout { Layout.preferredWidth: 170 * scaling Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft + Layout.bottomMargin: Style.marginXXS * scaling + Layout.topMargin: -Style.marginXXS * scaling spacing: -Style.marginXS * scaling RowLayout { @@ -119,7 +121,7 @@ NPanel { NText { text: Qt.locale().monthName(grid.month, Locale.LongFormat).toUpperCase() - pointSize: Style.fontSizeXL * 1.2 * scaling + pointSize: Style.fontSizeXL * 1.1 * scaling font.weight: Style.fontWeightBold color: Color.mOnPrimary Layout.alignment: Qt.AlignBaseline @@ -128,7 +130,7 @@ NPanel { NText { text: ` ${grid.year}` - pointSize: Style.fontSizeL * scaling + pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightBold color: Qt.alpha(Color.mOnPrimary, 0.7) Layout.alignment: Qt.AlignBaseline @@ -171,11 +173,12 @@ NPanel { // Digital clock with circular progress Item { id: clockItem + Layout.alignment: Qt.AlignVCenter anchors.right: parent.right anchors.rightMargin: Style.marginM * scaling anchors.verticalCenter: parent.verticalCenter - width: Style.fontSizeXXXL * 1.9 * scaling - height: Style.fontSizeXXXL * 1.9 * scaling + height: Math.round((Style.fontSizeXXXL * 1.9 * scaling) / 2) * 2 + width: clockItem.height // Seconds circular progress Canvas { From 357c30617dccf6a6c1220780c9ed115220ff3a0e Mon Sep 17 00:00:00 2001 From: MrDowntempo Date: Sat, 11 Oct 2025 02:38:46 -0400 Subject: [PATCH 07/10] More indentation cleanup --- Modules/Bar/Calendar/CalendarPanel.qml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index 8ae325b2..32bfde04 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -76,14 +76,14 @@ NPanel { text: { if (!weatherReady) return "" - var temp = LocationService.data.weather.current_weather.temperature - var suffix = "C" - if (Settings.data.location.useFahrenheit) { - temp = LocationService.celsiusToFahrenheit(temp) - suffix = "F" - } - temp = Math.round(temp) - return `${temp}°${suffix}` + var temp = LocationService.data.weather.current_weather.temperature + var suffix = "C" + if (Settings.data.location.useFahrenheit) { + temp = LocationService.celsiusToFahrenheit(temp) + suffix = "F" + } + temp = Math.round(temp) + return `${temp}°${suffix}` } pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightBold From 76770bbb3cd88ce02b08b5b9052d5e6e61c5385f Mon Sep 17 00:00:00 2001 From: MrDowntempo Date: Sat, 11 Oct 2025 02:43:34 -0400 Subject: [PATCH 08/10] Even more cleanup --- Modules/Bar/Calendar/CalendarPanel.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index 32bfde04..f60c7295 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -163,7 +163,7 @@ NPanel { } } - // Spacer to push content left + // Spacer between date and clock Item { Layout.fillWidth: true } @@ -226,12 +226,14 @@ NPanel { var t = Settings.data.location.use12hourFormat ? Qt.locale().toString(new Date(), "hh AP") : Qt.locale().toString(new Date(), "HH") return t.split(" ")[0] } + pointSize: Style.fontSizeXS * scaling font.weight: Style.fontWeightBold color: Color.mOnPrimary family: Settings.data.ui.fontFixed Layout.alignment: Qt.AlignHCenter } + NText { text: Qt.formatTime(Time.date, "mm") pointSize: Style.fontSizeXXS * scaling From c25ae8bec40a446519b7e4e5a230631543204d9f Mon Sep 17 00:00:00 2001 From: MrDowntempo Date: Sat, 11 Oct 2025 02:50:18 -0400 Subject: [PATCH 09/10] More consistent line breaks in source code --- Modules/Bar/Calendar/CalendarPanel.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index f60c7295..64c68738 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -221,6 +221,7 @@ NPanel { ColumnLayout { anchors.centerIn: parent spacing: -Style.marginXXS * scaling + NText { text: { var t = Settings.data.location.use12hourFormat ? Qt.locale().toString(new Date(), "hh AP") : Qt.locale().toString(new Date(), "HH") From 83b8f307a1cc5534216bb12691456b59ace1c296 Mon Sep 17 00:00:00 2001 From: Corey Woodworth Date: Sat, 11 Oct 2025 14:51:14 -0400 Subject: [PATCH 10/10] fix: fixed issues caused my my poor merge. removed incorrect OnPaint and moved brackets --- Modules/Bar/Calendar/CalendarPanel.qml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index d1a00070..fb71e723 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -236,26 +236,6 @@ NPanel { var t = Settings.data.location.use12hourFormat ? Qt.locale().toString(new Date(), "hh AP") : Qt.locale().toString(new Date(), "HH") return t.split(" ")[0] } - } - onPaint: { - var ctx = getContext("2d") - var centerX = width / 2 - var centerY = height / 2 - var radius = Math.min(width, height) / 2 - 3 * scaling - ctx.reset() - ctx.beginPath() - ctx.arc(centerX, centerY, radius, 0, 2 * Math.PI) - ctx.lineWidth = 2.5 * scaling - ctx.strokeStyle = Qt.alpha(Color.mOnPrimary, 0.15) - ctx.stroke() - ctx.beginPath() - ctx.arc(centerX, centerY, radius, -Math.PI / 2, -Math.PI / 2 + progress * 2 * Math.PI) - ctx.lineWidth = 2.5 * scaling - ctx.strokeStyle = Color.mOnPrimary - ctx.lineCap = "round" - ctx.stroke() - } - } pointSize: Style.fontSizeXS * scaling font.weight: Style.fontWeightBold