Bug 481170 - Timer countdown not centered
Summary: Timer countdown not centered
Status: RESOLVED FIXED
Alias: None
Product: KClock
Classification: Applications
Component: General (show other bugs)
Version: 24.01.95
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Devin Lin
URL:
Keywords: qt6
: 487164 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-10 14:22 UTC by wcyat
Modified: 2025-03-29 11:49 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
demo video (814.70 KB, video/webm)
2024-02-10 14:22 UTC, wcyat
Details
Timer not centered (52.23 KB, image/png)
2024-04-13 20:49 UTC, Titouan Camus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wcyat 2024-02-10 14:22:59 UTC
Created attachment 165729 [details]
demo video

SUMMARY
Timer countdown not centered.

STEPS TO REPRODUCE
1. install kde-unstable/kclock
2. open kclock and maximize it (about 1920x1080)
3. go to "Timers" tab
4. create a timer
5. start the timer

OBSERVED RESULT

The countdown text is not centered and is on the left. Going back and re-opening it twice makes it go back to center.

EXPECTED RESULT

The countdown text should be centered.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION

Using plasma 6.0 RC 2
Comment 1 Devin Lin 2024-02-12 22:03:03 UTC
Strange, I cannot seem to reproduce the issue you are having, however I am on Qt 6.6. I'll keep an eye out for this one
Comment 2 wcyat 2024-03-02 15:29:49 UTC
(In reply to Devin Lin from comment #1)
> Strange, I cannot seem to reproduce the issue you are having, however I am
> on Qt 6.6. I'll keep an eye out for this one

Downgrading to qt 6.6 did solve the issue for me.
Comment 3 Titouan Camus 2024-04-13 20:49:21 UTC
Created attachment 168479 [details]
Timer not centered

Can reproduce.

Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.7.0
Kernel Version: 6.5.0-27-generic (64-bit)
Graphics Platform: Wayland
Comment 4 Thomas Moerschell 2024-08-14 15:46:40 UTC
I found the issue. Will submit a PR shortly if I can manage (never have before).

--- a/src/kclock/qml/timer/TimerComponent.qml
+++ b/src/kclock/qml/timer/TimerComponent.qml
@@ -56,8 +56,8 @@ Rectangle {
         anchors.centerIn: parent
         
         id: timerCircle
-        implicitWidth: parent.width
-        implicitHeight: timerCircleArc.radiusX*2+5
+        implicitWidth: timerCircleArc.radiusX * 2 + timerCirclePath.strokeWidth
+        implicitHeight: timerCircleArc.radiusY * 2 + timerCirclePath.strokeWidth
         anchors.horizontalCenter: parent.horizontalCenter
         layer.enabled: true
         layer.samples: 40
Comment 5 Carl Schwan 2024-08-27 09:43:42 UTC
Git commit 424bcb294e7e1bf6466690b1701acc24ac5c7949 by Carl Schwan, on behalf of Thomas Moerschell.
Committed on 27/08/2024 at 09:43.
Pushed by carlschwan into branch 'release/24.08'.

Fix timer circle alignment

M  +2    -2    src/kclock/qml/timer/TimerComponent.qml

https://invent.kde.org/utilities/kclock/-/commit/424bcb294e7e1bf6466690b1701acc24ac5c7949
Comment 6 Devin Lin 2024-09-29 23:58:16 UTC
Git commit d1889da3cdcea0fea703e40f153c83085c9f89bb by Devin Lin, on behalf of Thomas Moerschell.
Committed on 29/09/2024 at 23:57.
Pushed by devinlin into branch 'master'.

Fix timer circle alignment

M  +2    -2    src/kclock/qml/timer/TimerComponent.qml

https://invent.kde.org/utilities/kclock/-/commit/d1889da3cdcea0fea703e40f153c83085c9f89bb
Comment 7 Kai Uwe Broulik 2025-03-29 11:49:38 UTC
*** Bug 487164 has been marked as a duplicate of this bug. ***