Re: resizing problem
- From: Jan-Marek Glogowski <glogow fbihome de>
- To: Robert Best <rwbest clix pt>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: resizing problem
- Date: Sun, 1 Aug 2004 23:18:18 +0200 (CEST)
Hi
I had a quick glace at the code:
1. Please use TRUE and FALSE, instead of 1 and 0 where the function
parameter is gboolean.
2. line 208:
- gtk_box_pack_start(GTK_BOX(vbox), menubar, 0, 1, 0);
+ gtk_box_pack_start(GTK_BOX(vbox), menubar, TRUE, TRUE, 0);
will do a correct resize of the drawing area.
3. Info: Since v2.4 GtkItemFactory has been deprecated in favour of
GtkUIManager.
4. The config event is a simplification, but since you do a resize in your
config event you should use GtkWidgets "size-request" and
"size-allocate".
This is the idea: On a resize "size-request" is called. Now you should
adjust the "resize requisition" to your preferred size / ratio / whatever.
Then "size-allocate" is called with the adjusted size.
Now do your calculation based on the new size.
Then your "expose" handler get's called. For a simple example see
gtklabel.c from the Gtk sources.
HTH
Jan-Marek
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]