Bug 459372 - Settings from Plasma 5.25 not used
Summary: Settings from Plasma 5.25 not used
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock widget (other bugs)
Version First Reported In: 5.25.90
Platform: Other Other
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-09-19 07:57 UTC by Iyán M. V.
Modified: 2022-09-24 02:30 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.26
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Iyán M. V. 2022-09-19 07:57:14 UTC
SUMMARY
The digital clock in Plasma 5.26 comes with a new settings to configure the text display: automatic and manual. If the user had done some manual changes to the appearance of the text in Plasma 5.25 or before, updating to Plasma 5.26 looses these changes.


STEPS TO REPRODUCE
1. Change the font and size of the digital clock on Plasma 2.52
2. Update to Plasma 5.26 Beta

OBSERVED RESULT
Text display is set to "Automatic", so changes made by the user are ignored after updating. If setting "Manual", previous changes do not appear there.

EXPECTED RESULT
I think the text display should be set to "Manual" if the previous values differ from default ones, using the old values.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.19.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: LENOVO
Product Name: 20XYCTO1WW
System Version: ThinkPad X1 Yoga Gen 6
Comment 1 Bug Janitor Service 2022-09-21 05:20:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2152
Comment 2 Bug Janitor Service 2022-09-21 16:54:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2154
Comment 3 Nate Graham 2022-09-23 02:14:36 UTC
Git commit 9bf9cc4fcfcabd55652e6a7d2eac3b778253d210 by Nate Graham, on behalf of Jin Liu.
Committed on 23/09/2022 at 02:14.
Pushed by ngraham into branch 'master'.

applets/digital-clock: use theme default font when fontFamily not set

When migrating from 5.25 config, the user may have previously set
boldText=true and fontFamily="". In this case, we need to use the
system font, and not the applet's (nonexistent) configured font.

This is required by https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1169

M  +1    -1    applets/digital-clock/package/contents/ui/DigitalClock.qml

https://invent.kde.org/plasma/plasma-workspace/commit/9bf9cc4fcfcabd55652e6a7d2eac3b778253d210
Comment 4 Fushan Wen 2022-09-24 01:26:06 UTC
Git commit 6204d73eae9beb6837b07f4d0d643d176a412d79 by Fushan Wen, on behalf of Jin Liu.
Committed on 24/09/2022 at 01:26.
Pushed by fusionfuture into branch 'master'.

applets/digital-clock: migrate font settings

Plasma 5.26 introduced a new config entry autoFontAndSize which defaults
to true.
This means if the user customized font before (fontFamily, boldText,
italicText), in 5.26 these settings are ignored.

So we need to set autoFontAndSize=false if:
1. Any of these 3 old entries above is set.
2. No new entries introduced in 5.26 (autoFontAndSize, fontSize,
   fontWeight, fontStyleName) are set, so this is a config from 5.25.
And fontWeight should be set to 75 (Font.Bold) if boldText==true.

A  +46   -0    desktoppackage/contents/updates/digitalclock_migrate_font_settings.js

https://invent.kde.org/plasma/plasma-desktop/commit/6204d73eae9beb6837b07f4d0d643d176a412d79
Comment 5 Fushan Wen 2022-09-24 02:24:43 UTC
Git commit 7fcb5948696ff2748ce667a0b8eaa4f426543c62 by Fushan Wen, on behalf of Jin Liu.
Committed on 24/09/2022 at 02:24.
Pushed by fusionfuture into branch 'Plasma/5.26'.

applets/digital-clock: migrate font settings

Plasma 5.26 introduced a new config entry autoFontAndSize which defaults
to true.
This means if the user customized font before (fontFamily, boldText,
italicText), in 5.26 these settings are ignored.

So we need to set autoFontAndSize=false if:
1. Any of these 3 old entries above is set.
2. No new entries introduced in 5.26 (autoFontAndSize, fontSize,
   fontWeight, fontStyleName) are set, so this is a config from 5.25.
And fontWeight should be set to 75 (Font.Bold) if boldText==true.


(cherry picked from commit 6204d73eae9beb6837b07f4d0d643d176a412d79)

A  +46   -0    desktoppackage/contents/updates/digitalclock_migrate_font_settings.js

https://invent.kde.org/plasma/plasma-desktop/commit/7fcb5948696ff2748ce667a0b8eaa4f426543c62
Comment 6 Fushan Wen 2022-09-24 02:25:13 UTC
Git commit 54ca3e91e384d519746840b7342055ab0417994f by Fushan Wen, on behalf of Jin Liu.
Committed on 24/09/2022 at 02:25.
Pushed by fusionfuture into branch 'Plasma/5.26'.

applets/digital-clock: use theme default font when fontFamily not set

When migrating from 5.25 config, the user may have previously set
boldText=true and fontFamily="". In this case, we need to use the
system font, and not the applet's (nonexistent) configured font.

This is required by https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1169


(cherry picked from commit 9bf9cc4fcfcabd55652e6a7d2eac3b778253d210)

M  +1    -1    applets/digital-clock/package/contents/ui/DigitalClock.qml

https://invent.kde.org/plasma/plasma-workspace/commit/54ca3e91e384d519746840b7342055ab0417994f