How to make GTK3 look native in Windows 7?

I am trying to make the GTK3 application look native in Windows 7. I tried to answer in the next question How to get my own Windows decorations on GTK3 in Windows 7+ and MSYS2

But that will not work. My version of GTK3 on windows is 3.22 and I use the Vala language. I tried with GTK3 version 3.20 to no avail. I also tried changing the background color of the application in the code itself using CssProvider , and it works on Ubuntu, but not on Windows. On Windows, the application theme and all manual CSS settings are ignored.

Is there any way to achieve this? Thank.

+4
source share
1 answer

, , show_all():

Gtk.Settings.get_default ().gtk_theme_name = "win32";

: "YourApplicationExecutable\share\themes\ThemeFolder", Windows GTK3 Windows 7+ MSYS2

, gtk_theme_name , , .

, get_default() GDK . , get_settings() , .

:

GTK3 Windows 7+ MSYS2

https://valadoc.org/gtk+-3.0/Gtk.CssProvider.html

https://valadoc.org/gtk+-3.0/Gtk.Settings.html

+4

Source: https://habr.com/ru/post/1676811/


All Articles