Forum > Linux
[SOLVED] Lazarus IDE 4 UI fails to sync on dark mode under Fedora KDE 6
Psacla_63:
Under Fedora KDE 6 in dark mode some widgets (button, popup, text field, dialogs) seems to stay in light mode and bigger than theme. Particulary fonts are in white on light gray background and some button's icons buttons are stuck on Breeze light. It looks like some part of the UI on Lazarus switch to dark mode (following theme) and other stay stuck on light mode, it's very weird.
Under XFCE, Gnome, Cinnamon, no problem.
I tried Lazarus under some other recent KDE distros (Neon, Kubuntu, Mageia, Manjaro, MX) without this problem, installing Lazarus either from distro package and the offical one from sourceforge (.rpm ).
I tried to install mannually KDE (dnf group install kde-desktop) on Fedora Workstation 42 edition (Gnome)... same problem.
I tried to install some stable dark themes for Gtk, Qt and Plasma,... problem is still same.
No problem on "old" soft using GTK UI like
* GNATstudio
* Dia
* LibreCAD.Geany works perfectly (Using GTK+ v3.24.49 and GLib v2.84.2 runtime libraries)!
NOTE:
on Fedora scientific KDE version 39, Lazarus just ignores dark theme. So version 42 its a little bit better, but pretty unusable.
I tried to use Wayland and X11 on version 39: no differences.
So I thought that problem origin is Fedora and not Lazarus, but it seems that is more complicated. I'm probably missing something, but Lazarus IDE fails on Fedora KDE standard installation.
UPDATE: after a lot of tests, it looks like Lazarus try to use some default UI parts and doesn't follow whole GTK theme. On other distro (Neon,kubuntu,Manjaro,etc) Lazarus follows the whole theme. So, I think there is probably a Lazarus parameter with a wrong value.
I think that the Manjaro and Arch teams may have an explanation because apparently they have compiled Plasma with different options.
For now the only 2 options I found is
* use Fedora with XFCE.
use Fedora KDE in ligth theme.
*
[SOLVED]
Edit .gtkrc-2.0-kde4 and replace line 13
--- Code: Bash [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---include "/usr/share/themes/Adwaita/gtk-2.0/gtkrc"
by
--- Code: Bash [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---include "/usr/share/themes/Breeze-Dark/gtk-2.0/gtkrc"
It looks like Fedora does not update correctly this file when a dark theme is selected. >:D
Some other GTK apps are not impacted by that but Lazarus is... If someone could have an explanation?
Config
Lazarus 4.0 (rev Unknown) FPC 3.2.2 x86_64-linux-gtk2
Operating System: Fedora Linux 42
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.14.6-300.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i9-9900K CPU @ 3.60GHz
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1080 Ti
dbannon:
--- Quote from: Psacla_63 on June 13, 2025, 11:45:24 pm ---....
So I thought that problem origin is Fedora and not Lazarus, but it seems that is more complicated.
....
--- End quote ---
Its more likely some interaction between KDE and Lazarus.
You have to understand that Fedora is really a platform for RedHat to test ideas that may, at some time make it into its core product, RedHat Linux. Sure, its been tested by the Fedora developers but they cannot possibly test every possible combination.
In the past, I was a big KDE user. But at some point (long before I discovered Lazarus incidentally) I got sick of the "surprises" I'd get on every update. Back then, at least, 'they' were willing to take risks that did not suit my workstyle !
So, my point, a combination of Fedora and KDE ? Expect the occasional issue ! Probably be fixed in next release.
Other distros and Desktops are sure not guaranteed to be issue free, but just might be better IMHO ?
Davo
Psacla_63:
Thank you for the advice.
I need a distro that uses rpm, has a good user interface, works well with KDE applications and allows users to install applications easily and has an acceptable privacy policy. Personally, my favorites are Manjaro and MX. But I have to use an rpm-based system, so RedHat and Fedora.
Fedora has done the job well so far. I know Lazarus isn't the most widely used, but I have projects to do in Pascal. Fedora is widely used, KDE popular. So far Lazarus works well under Fedora, the only big problem is that it doesn't follow themes and here the dark theme. This problem can't be too complicated to solve?
dsiders:
--- Quote from: Psacla_63 on June 16, 2025, 08:15:09 pm ---Thank you for the advice.
I need a distro that uses rpm, has a good user interface, works well with KDE applications and allows users to install applications easily and has an acceptable privacy policy. Personally, my favorites are Manjaro and MX. But I have to use an rpm-based system, so RedHat and Fedora.
Fedora has done the job well so far. I know Lazarus isn't the most widely used, but I have projects to do in Pascal. Fedora is widely used, KDE popular. So far Lazarus works well under Fedora, the only big problem is that it doesn't follow themes and here the dark theme. This problem can't be too complicated to solve?
--- End quote ---
I use OpenSUSE. What you don't mention is the Application style used in KDE. I've had problems with Breeze app style. Fusion works as expected.
Psacla_63:
Thank you for your comment.
Well, I use the default UI as a new user do. But, I tried to use Breeze and Fusion, even I installed and tried kvantum. This does not solve the problem: I can't find why but under Fedora, Lazarus has serious problems with dark mode and theme in general.
Do you know what is the cause of problem with Breeze in Application style in OpenSUSE?
Navigation
[0] Message Index
[#] Next page