Search code examples
gtk4gtkmm4

How to change theme in GTK4.0 on windows?


I'm new to development using GTK. I installed gtkmm4.0 on windows using mingw64, but i noticed that the applications generated follow the default theme(adwaita); however i want to change that and use the windows 10 native theme. Where is the settings.ini file located in windows 10? I have searched it in the usual places described on the web, but could not find it(even tried creating one myself),does GTK4.0 on windows have a settings.ini file at all?


Solution

  • It is located in any of (but you will probably need to create it yourself):

    DLL prefix/share/gtk-4.0/settings.ini
    DLL prefix/etc/gtk-4.0/settings.ini
    C:/Documents and Settings/All Users/Application Data/gtk-4.0/settings.ini
    C:/Documents and Settings/username/Local Settings/Application Data/gtk-4.0/settings.ini
    

    You can also use the GTK_THEME environment variable.

    Note that GTK no longer ships a default Windows imitation theme in GTK4 (in GTK3 it was really, really, really, bad anyway). If you want to have a native Windows look, you will need to write your own theme.

    Also, in recent versions of GTK, the default theme is not "Adwaita", but "Default"