Bug 477457 - With fractional scale factor, clock SVG is sized inappropriately when KCM is opened externally
Summary: With fractional scale factor, clock SVG is sized inappropriately when KCM is ...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_clock (show other bugs)
Version: 5.27.80
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-11-24 10:32 UTC by Jin Liu
Modified: 2024-01-26 16:43 UTC (History)
5 users (show)

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


Attachments
screenshot (493.12 KB, image/png)
2023-11-24 10:32 UTC, Jin Liu
Details
screenshot, 250% scale, beta 2, qt6.7beta (281.30 KB, image/png)
2023-12-23 12:35 UTC, Jin Liu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jin Liu 2023-11-24 10:32:05 UTC
Created attachment 163423 [details]
screenshot

STEPS TO REPRODUCE
1. Set global zoom to 250%.
2. Right-click on the digital clock applet in taskbar.
3. Select "Adjust date and time"

OBSERVED RESULT
Date & time kcm appears with a huge analog clock (see attachment).
It returns normal on window resize.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Kernel Version: 6.6.2-arch1-1 (64-bit)
Graphics Platform: offscreen
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 13.5 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 Nate Graham 2023-11-26 17:23:23 UTC
Can reproduce when using any fractional scale factor and running `systemsettings kcm_clock`. Does not reproduce when navigating to the KCM from within System Settings, though.
Comment 2 Marco Martin 2023-11-28 10:18:32 UTC
Git commit cd712fdbdbc86519ff2b47b9768ff59b3ab6ede8 by Marco Martin.
Committed on 28/11/2023 at 11:18.
Pushed by mart into branch 'master'.

Workaround for fractional scaling rendering

don't set the devicepixelratio on the intermediate images but only on
the last one using scaled sizes for the images in between, or
KSvg::paint gets confused

the proper solution is to make ksvg support natively fractional scaling

M  +6    -8    kcms/dateandtime/dtime.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/cd712fdbdbc86519ff2b47b9768ff59b3ab6ede8
Comment 3 Jin Liu 2023-12-23 12:35:18 UTC
This bug is still present in Beta 2 (see attachment). On Archlinux it's built with Qt 6.7beta so that might be related.
Comment 4 Jin Liu 2023-12-23 12:35:46 UTC
Created attachment 164404 [details]
screenshot, 250% scale, beta 2, qt6.7beta
Comment 5 Nate Graham 2024-01-09 23:56:44 UTC
Yup, can also still reproduce the issue in the same way.
Comment 6 Steve Cossette 2024-01-16 11:23:22 UTC
Still is the case on RC1 here.
Comment 7 Bug Janitor Service 2024-01-26 16:31:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2013
Comment 8 Marco Martin 2024-01-26 16:42:28 UTC
Git commit 69f0713b8f60757131b0cd007860d190f10d05bc by Marco Martin.
Committed on 26/01/2024 at 17:32.
Pushed by mart into branch 'master'.

refresh clock svg when dpi change

if the clock gets displayed before the window gets the correct dpi,
refresh it when a DevicePixelRatioChange event arrives

M  +8    -0    kcms/dateandtime/dtime.cpp
M  +1    -0    kcms/dateandtime/dtime.h

https://invent.kde.org/plasma/plasma-desktop/-/commit/69f0713b8f60757131b0cd007860d190f10d05bc
Comment 9 Marco Martin 2024-01-26 16:43:14 UTC
Git commit bc88df1cc426bccf55a505998228d98df108a6ee by Marco Martin.
Committed on 26/01/2024 at 17:43.
Pushed by mart into branch 'Plasma/6.0'.

refresh clock svg when dpi change

if the clock gets displayed before the window gets the correct dpi,
refresh it when a DevicePixelRatioChange event arrives

M  +8    -0    kcms/dateandtime/dtime.cpp
M  +1    -0    kcms/dateandtime/dtime.h

https://invent.kde.org/plasma/plasma-desktop/-/commit/bc88df1cc426bccf55a505998228d98df108a6ee