Re: Getting native colors in GTK/GDK?



Some such engines have been written, or attempted
(GTK-Wimp, GTK-Qt theme engine, ...)

Note that what you call GTK-Wimp is actually called the "MS-Windows"
theme and has been included in GTK+ itself for quite some time
already. (Just the actual theme engine DLL is called "wimp". The theme
and the theme engine source code is called "MS-Windows".)

Before the client-side-windows changes (i.e. until 2.16) it, to the
best of my knowledge, worked quite well in making a GTK+ application
look more like an application that uses Microsoft widgets. (I refuse
to use the term "native" as that would imply that GTK+ is somehow
"emulated".) Then the use of XP-and-later features broke and was only
recently fixed. In current git in the gtk-2-22 and master branches the
ms-windows theme now again works, and the latest Windows builds of
GTK+ (2.20.1-3) on ftp.gnome.org have those changes.

Note that the ms-windows theme is not the default unless you make it
so, typically by using an etc/gtk-2.0/gtkrc file that contains the
single line gtk-theme-name="ms-windows".

I grepped the source code and there is no mention of GetSysColor,

Try grep GetSysColor modules/engines/ms-windows/*.c .

The default theme engine, that is included in Gtk+, uses, of course, the
Gtk+ theme.

As I said, the ms-windows theme engine is also included in GTK+. (At
least in the source code, and also in "my" binaries on ftp.gnome.org,
linked to from www.gtk.org. It might of course be that some other
packager has chosen to leave out the ms-windows theme engine and
theme.

--tml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]