Re: gtk on windows 10



On 10.03.2018 1:36, Kasper Peeters wrote:
I have successfully compiled a previously linux-only gtk-based program
on Windows 10 using the vcpkg packages. Things run, but the look is not
good yet.

What is the up-to-date status of getting gtk apps on Windows 10 to look
as native as possible?

You can run with GTK_CSD=0, but it will only work on windows that do not require CSD (the "require CSD" bit is up to the developer of an application; if it needs CSD, there's nothing you can do). Either way, that would only affect window decorations, not the widgets themselves.

It's possible to install a theme that makes gtk3 look more windows-ish (not just decorations, but all of the widgets). The "win32" theme was one attempt to do that, but in my opinion it fell short, and it's not maintained, as far as i know. The "win32" theme uses parts of Windows theming API to draw things, which makes it look more native in some places, but Windows theming API really sucks (the things it lets you draw are stuck in Windows 7 era or something...). It might be possible to make a pure-CSS "Windows" theme just making GTK theme engine draw something Windows-like, without using Windows theming API. However, i do not want to spend time doing that (besides, i don't know CSS very well). Unless you find someone who does, you're out of luck.

So the answer to your question is "you can't". There are some things that can be improved about the whole decorations situation (i prototyped some of them, looks promising), but for the widgets themselves the things described above are really all there is to it.

Attachment: signature.asc
Description: OpenPGP digital signature



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