Re: Fixed as a NO_WINDOW

Tim Janik wrote:

On 18 Nov 2001, Owen Taylor wrote:

Those were all the API changes. Really, no kidding. Well, almost.

GtkFixed _really_ needs to be a NO_WINDOW widget; this has been bugging me since 1.0.

* For correct theming
* For consistency with all other containers that don't draw anything.
* For reduced overhead.


* I couldn't find any code in GNOME cvs that this will break

* If there is something that breaks, insert:

after creating the fixed.

(I added the hack of making this work, because I'm pretty sure people frequently use GtkFixed as an equivalent of a widget in some
  other toolkit with fixed placement, and I don't want
  such people to have write a new widget.)

arg! the GtkFixed NO_WINDOW part is fine, but people shall _never_ use
GTK_WIDGET_[UN]SET_FLAGS() in third-party code. checking for GTK_WIDGET_NO_WINDOW in gtkfixed.c to create a window
on demand is somewhat questionable, it might be usable for derived widgets,
but it's ugly as hell.

however, i'll not accept an API change (whether last minute or not) that makes
regardless of the flag being passed.

besides, there's really no need to do that, people can simply put GtkFixed into
an eventbox.

Hasn't use of GTK_WIDGET_SET_FLAGS() always been something that toolkit users needed? The big one was setting the CAN_DEFAULT flag on buttons in dialogs.


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