Re: Theme not affecting titlebar on windows xp... help needed



"Plummer, Jeff-P56711" wrote:

An application looks strange if the inside boxes have one theme, and the
outsides window has a different theme (i.e. default windows titlebar,
close, minimize, maximize buttons).

There has to be a way to make a windows application look like something
other than a boring looking windows app.

In fact, GTK+ (as well as QT and other toolkits btw) deal with the
interior of a window only. Title bar, min+max buttons etc. don't belong
to the interior of a window but to its decoration. Windows decorations
are controlled by window managers.

This control extends to both behaviour and appearance. Nowadays, most
window managers support themes as well as GTK+ does, but they're
completely independent from each other. Neither can a GTK+ application
reliably determine under which window manager it's running or what its
capabilities are or what theme it is using or what this theme is looking
like, nor does the window manager know anything about the application(s)
inside its windows, whether they're GTK+-based, QT-based, native
Window-widgets-based, Motif-based or whether they're based on something
completely different. In fact, window managers don't know anything about
GTK+ widgets like labels, buttons, images or others.

Window managers simply don't care what is going on inside their windows
and by what toolkit and how the contents are controlled. The same is
true the other way round for toolkits. Especially on X11 this results in
the freedom of optionally having i.e. three different applications
running concurrently, one basing on GTK+, another one basing on QT and
the third one basing on Java Swing. The interiors of such three windows
will usually look quite different from each other, as all of those
toolkits uses different sorts of themes. But window decorations look
identical for all of them (regarding the theme).

On X11 there is a choice between dozenillions of different window
managers, from simplicistic (ugly) to very sophisticated ones. On
MS-Windows there's just one windows manager available, namely the
built-in one of MS-Windows.

The only way to make the decorations of your windows look like the
interior would be to create your own pseudo window manager. Using GTK+,
you can certainly create a title bar that contains typical system,
minimize and maximize buttons and a window caption and looks the same
way your GTK+ theme looks like. You would request a window without its
builtin decorations from the window manager to accomplish this. (This is
possible by gdk_window_set_decorations() for instance).

However, then you would have to manage all tasks the window manager
takes care of by yourself, i.e. minimizing and maximizing the window on
request and providing correct drag behaviour. For resizability of your
windows you would still have to rely on the real window manager, since
the resizing borders don't (and can't) belong to the interior of a
window.

In fact, many bloated Windows programs (especially drivers and games)
use this technique to provide their windows with an entirely custom
(usually strange) look. Take into account that likely the vast majority
of users doesn't appreciate every application (and its windows) having
their own, nonstandard, nonchangeable look.

In short: don't waste your time with such efforts! Users won't
appreciate it. Especially not brand-conscious GTK+ application users.



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