<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi David,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I just did some debugging to find out, how KDE Palettes are promoted to the QKdeTheme.<br>
The blunt answer is: They don't, and they have never been.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
They were probably meant to be promoted at some point, because QKdeTheme implements an array of QPalette pointers (size == NPalettes == 17).<br>
So for each palette type, a new QPalette could be constructed from a KDE Palette. But that's not happening. The first record of the array is populated with default constructed QPalette, which is a fusion palette.<br>
All other records are initialized with nullptr and they remain like that throughout the life time of the QGuiApplication.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
QKdeTheme just implements font handling. Color wise, QGuiApplications won't blend in with KDE palettes. They just stick with a default fusion palette.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
That said: I think there's nothing needed right now. But we may want to pimp up QKdeTheme.<br>
The patch I mentioned factors it out from qgenericunixthemes.cpp. So enhancing the class will become a little easier.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers<br>
Axel</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> David Redondo <kde@david-redondo.de><br>
<b>Sent:</b> Monday, 10 March 2025 17:39<br>
<b>To:</b> kde-devel@kde.org <kde-devel@kde.org><br>
<b>Cc:</b> Axel Spoerl <axel.spoerl@qt.io><br>
<b>Subject:</b> Re: Programmatic color scheme change in QKdeTheme</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">[You don't often get email from kde@david-redondo.de. Learn why this is important at
<a href="https://aka.ms/LearnAboutSenderIdentification">https://aka.ms/LearnAboutSenderIdentification</a> ]<br>
<br>
Hi Alex,<br>
<br>
Am Montag, 10. März 2025, 16:49 schrieb Axel Spoerl:<br>
> Hi KDE folks,<br>
><br>
> Qt 6.8 has implemented QPlatformTheme::requestColorScheme() as a virtual function. It is meant to allow a programmatic color scheme change within a QGuiApplication. If the system's theme is dark, the application can still be light and vice versa.<br>
> <a href="https://codereview.qt-project.org/c/qt/qtbase/+/628010">https://codereview.qt-project.org/c/qt/qtbase/+/628010</a> re-implements this function in QKdeTheme. In case of a deviation (requested color scheme != system color scheme), it falls back to
 a fusion palette (of which a dark and a light version exist).<br>
><br>
<br>
Do you think it would be helpful if we would give you the palettes that result when using Breeze and Breeze Dark colors that you could use instead of fusion?<br>
<br>
Also thanks for the heads up, maybe it's something we need to implement in our own  QPlatformTheme.<br>
<br>
David<br>
<br>
<br>
<br>
<br>
</div>
</span></font></div>
</body>
</html>