Bug 457301 - Running applications start to use the general font for everything after any font setting is changed
Summary: Running applications start to use the general font for everything after any f...
Status: CONFIRMED
Alias: None
Product: plasma-integration
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.25.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-30 14:53 UTC by hexclover
Modified: 2022-08-01 19:59 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hexclover 2022-07-30 14:53:57 UTC
SUMMARY
If some new setting is applied in the fonts KCM, applications that are currently open start to use the (new) general font for things like menus and toolbars. The new menu/toolbar/... font settings will only take effect after the application is restarted.

STEPS TO REPRODUCE 
1. In system settings, set the general, menu and toolbar fonts; say we have Noto Sans Regular, Noto Sans Bold, Noto Sans Italic respectively.
2. Open a Qt application that have context menus and/or toolbars, say Dolphin. It should use the fonts above.
2. Keep Dolphin open. In system settings, change any setting and apply; for example, change the menu font to Monospace.
3. Right-click to open the context menu in Dolphin.

OBSERVED RESULT
In the last step, Dolphin uses the General font (Noto Sans Regular) instead of the Menu font (Monospace) for the right-click menu.

EXPECTED RESULT
Dolphin should use exactly the new font settings. (use Monospace for the menu)

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION
I think this is a problem in the KDE Qt platform theme:

https://github.com/KDE/plasma-integration/blob/bc6f94f02709b4b2fc7c3da3149c330eedd39a16/src/platformtheme/kfontsettingsdata.cpp#L93

When new font settings are applied, lines 93-97 cause the existing application to use the general font as the default for all widgets.
Comment 1 Nate Graham 2022-08-01 19:59:06 UTC
Can reproduce.