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
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
include "/usr/share/themes/Adwaita/gtk-2.0/gtkrc"
by
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.

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