How to set GTK4 to use system theme?

772 Views Asked by At

I compiled and launched simplest GTK4 demo from official GTK documentation using libgtk-4-dev with #include <gtk/gtk.h> Somehow, it's considered by my GNOME environment as "legacy" and runs with respective theme (Adwaita default) from gnome tweaks, not with dark theme which I set in gnome settings. What can I do to prevent this behaviour and force my GTK app to use system theme? Maybe I use wrong compiler command:

g++ $(pkg-config --cflags gtk4) -O2 -o testGTKapp main.cpp $(pkg-config --libs gtk4)

0

There are 0 best solutions below