Bug 439743 - Theme doesn't change in KDevelop. KDevelop doesn't obey qt5ct.
Summary: Theme doesn't change in KDevelop. KDevelop doesn't obey qt5ct.
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: UI: general (show other bugs)
Version: 5.6.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-11 02:34 UTC by Jesper
Modified: 2025-02-26 13:04 UTC (History)
4 users (show)

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


Attachments
kdevelop with the qt5ct Fusion theme, "darker" color scheme (kdevelop doesn't use it) (233.32 KB, image/png)
2022-01-09 03:49 UTC, Jeffrey Bosboom
Details
kdevelop with the qt5ct gtk2 theme, "darker" color scheme (kdevelop sort-of uses it) (214.71 KB, image/png)
2022-01-09 03:50 UTC, Jeffrey Bosboom
Details
strace of kdevelop showing that libqt5ct.so is loaded and qt5ct config is read (586.66 KB, application/zstd)
2022-01-09 03:50 UTC, Jeffrey Bosboom
Details
installed package versions of kdevelop and its dependencies (6.67 KB, text/plain)
2022-01-09 03:51 UTC, Jeffrey Bosboom
Details
installed package versions of qt5ct and its dependencies (2.61 KB, text/plain)
2022-01-09 03:52 UTC, Jeffrey Bosboom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesper 2021-07-11 02:34:19 UTC
SUMMARY

Theme doesn't change in KDevelop. KDevelop doesn't obey qt5ct.

STEPS TO REPRODUCE
1. Install qt5ct on Archlinux.
2. Add QT_QPA_PLATFORMTHEME=qt5ct to ~/.profile
3. Change the theme in qt5ct to something else.
4. Reboot.
5. Open up another qt-based application and check if the theme has changed.
6. Open up KDevelop and check if the theme has changed.

OBSERVED RESULT

The theme doesn't change. KDevelop doesn't support the
QT_QPA_PLATFORMTHEME=qt5ct option.
Which the other applications on the system does.

EXPECTED RESULT

Dark theme, in contrast from the default white "KDevelop theme".

SOFTWARE/OS VERSIONS
KDevelop: 5.6.2
Windows: 
macOS: 
Linux/KDE Plasma: 5.12.15/-
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Sven Brauch 2021-07-11 08:55:27 UTC
Hi, can you please ensure you have Settings -> Color Scheme set to "Default"? Since many people want their IDE in different colors than the rest of their desktop, we support separately setting our color scheme. Maybe that conflicts with your system-wide choice.
Comment 2 Bug Janitor Service 2021-07-26 04:33:28 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2021-08-10 04:36:23 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 4 Jeffrey Bosboom 2022-01-09 03:48:30 UTC
I also have this problem (kdevelop not using qt5ct theme).  Unlike the first reporter, I intend to answer requests for more information.

Arch Linux, rolling release up-to-date as of today (2022-01-08), kernel version 5.15.13-arch1-1, X.org server version 1.21.1.3, Openbox (window manager) version 3.6.1, kdevelop version 5.7.211201 (21.12.1), qt5ct version 1.5.  I have attached the output of `pactree --linear --unique --optional <package>` for both kdevelop and qt5ct, in case the problem is a missing or outdated dependency.


OBSERVED BEHAVIOR: I installed qt5ct, configured the "darker" color scheme for the "Fusion" style (the default style), and exported the environment variable QT_QPA_PLATFORMTHEME=qt5ct.  Under this configuration, kdevelop uses a black-on-white (light) theme (see the attached screenshot).  Picard (a Qt5 music tagger) correctly uses the dark theme.

I believe kdevelop Settings -> Color Scheme -> Default is selected, or at least clicking it does nothing.  (There are no other items in that submenu, but there's no checked checkbox or other indication that the Default item is selected.)

I ran kdevelop under strace (traces attached).  The main thread (6498) loads `/usr/lib/qt/plugins/platformthemes/libqt5ct.so` and reads `/home/jbosboom/.config/qt5ct/qt5ct.conf` and `/usr/share/qt5ct/colors/darker.conf`.

I then built and installed qt5-styleplugins from the Arch Linux AUR and configured qt5ct to use the "gtk2" style, again with the "darker" color scheme.  In this configuration, kdevelop uses a mix of colors resulting in both light text on a light background and dark text on a dark background (see the attached screenshot).  Picard looks mostly okay in this configuration (just a couple of dark-on-dark menu items).


DESIRED BEHAVIOR: kdevelop successfully uses the "darker" color scheme for the "Fusion" theme under qt5ct.
Comment 5 Jeffrey Bosboom 2022-01-09 03:49:31 UTC
Created attachment 145246 [details]
kdevelop with the qt5ct Fusion theme, "darker" color scheme (kdevelop doesn't use it)
Comment 6 Jeffrey Bosboom 2022-01-09 03:50:13 UTC
Created attachment 145247 [details]
kdevelop with the qt5ct gtk2 theme, "darker" color scheme (kdevelop sort-of uses it)
Comment 7 Jeffrey Bosboom 2022-01-09 03:50:57 UTC
Created attachment 145248 [details]
strace of kdevelop showing that libqt5ct.so is loaded and qt5ct config is read
Comment 8 Jeffrey Bosboom 2022-01-09 03:51:44 UTC
Created attachment 145249 [details]
installed package versions of kdevelop and its dependencies
Comment 9 Jeffrey Bosboom 2022-01-09 03:52:02 UTC
Created attachment 145250 [details]
installed package versions of qt5ct and its dependencies
Comment 10 Jeffrey Bosboom 2022-01-11 06:31:24 UTC
I have found a workaround:
- launch KDevelop
- open the qt5ct configuration tool (`/usr/bin/qt5ct`)
- go to the Troubleshooting tab (all the way on the right)
- check the "Force raster surface" box (note this is a tri-state box, make sure it's checked)
- click OK or Apply
- wait a few seconds

As long as KDevelop remains open, almost all of the interface is correctly themed.  The only exception I see are the editor tooltips that show semantic information when hovering a variable/function/etc., which are still black-on-white (light).  If I close KDevelop and re-launch it, it uses the default light theme again, and I have to re-run `qt5ct` and click OK (no actual changes necessary).

The "Force raster surface" checkbox is a global setting, not tied to any particular application, but it doesn't seem to have any negative effects on Picard (the only other Qt application I use regularly).

The tooltip for the "Force raster surface" checkbox is "Make top-level widgets use pure raster surfaces, and do not support non-native GL-based child widgets."  KDevelop doesn't appear to be making special use of vector graphics or OpenGL, so I'm not sure what this means, but maybe it's useful information for you.
Comment 11 Igor Kushnir 2025-02-26 13:04:10 UTC
A related change !720 was merged today. It will be released in KDevelop version 6.2.250400. Now KDevelop's appearance is governed by KDE system settings, as is the appearance of many other KDE applications since KDE frameworks version 6.3 or later. See also https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/720#note_1126834 . Please retest and reopen or create a new bug if something is still broken.