Bug 452091

Summary: KColorSchemeManager: Selecting default color scheme doesn't respect dark mode on Windows
Product: [Frameworks and Libraries] frameworks-kconfigwidgets Reporter: Nicolas Fella <nicolas.fella>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version: 5.92.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nicolas Fella 2022-03-30 22:31:54 UTC
STEPS TO REPRODUCE
1. In Windows system settings configure dark colors for apps
2. Open Kate. It has dark colors
3. Select Settings > Color Scheme > Breeze Light. Now colors are light
4. Select Settings > Color Scheme > Default

OBSERVED RESULT
Kate has light colors

EXPECTED RESULT
Kate has dark colors

SOFTWARE/OS VERSIONS
Windows: 10
KDE Frameworks Version: 5.92
Qt Version: 5.15

ADDITIONAL INFORMATION
After closing and reopening Kate colors are dark as expected
Comment 1 Nate Graham 2022-03-31 21:53:28 UTC
Fixed by Thomas Friedrichsmeier in Frameworks 5.93 with https://invent.kde.org/frameworks/kconfigwidgets/-/commit/17b367ddc5c7e0b13703a247a42ff858d92e9780!
Comment 2 Nicolas Fella 2022-03-31 22:10:46 UTC
No, that's a different thing
Comment 3 Nicolas Fella 2022-05-02 15:51:37 UTC
Git commit 9f7b8a902d9654520f4fac5c870d5b1174c893ff by Nicolas Fella.
Committed on 29/04/2022 at 23:15.
Pushed by nicolasfella into branch 'master'.

[kcolorschememanager] Rework and improve auto theme switching

Extract the automatically determined color scheme into a function

Avoid applying the scheme twice on startup

Fix activating the default scheme when system is dark

M  +54   -29   src/kcolorschememanager.cpp
M  +0    -2    src/kcolorschememanager.h
M  +16   -3    src/kcolorschememanager_p.h
M  +4    -1    src/windowsmessagesnotifier.cpp

https://invent.kde.org/frameworks/kconfigwidgets/commit/9f7b8a902d9654520f4fac5c870d5b1174c893ff