Re: [Gimp-developer] Window resize
Hi, On Sun, 2008-07-20 at 08:17 -0700, Bill Skaggs wrote: Um, GtkWrapBox is part of Gimp, not GTK+, in spite of its name. (I have no doubt that Sven knows that, and was reacting without having closely read the question.) I've read the question and I came to the conclusion that it appears not related to the development of GIMP and that it would be much more on-topic (and more likely to be answered) on gtk-list or gtk-app-devel-list. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Window resize
On Fri, Jul 18, 2008 at 12:32 AM, Sven Neumann [EMAIL PROTECTED] wrote: Hi, if you have questions on using GTK+, please ask on gtk-list or gtk-app-devel-list. Thanks. Um, GtkWrapBox is part of Gimp, not GTK+, in spite of its name. (I have no doubt that Sven knows that, and was reacting without having closely read the question.) -- Bill ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Window resize
Hello, I have put some GtkButtons inside a Gtk V WrapBox (which is a container) and then I've put this very GtkVWrapBox inside a GtkWindow. A GtkVWrapBox's job consists in placing all the GtkButtons it contains in columns on its left-hand side. If enough height is available, the GtkVWrapBox will place all the GtkButtons in a single column on the left-hand side. Otherwise, it will create as many columns as needed, thus requiring more WIDTH to display the extra columns. When the MOUSE resizes the GtkWindow which embarks my GtkVWrapBox, I can't force this GtkWindow to resize properly to accomodate the GtkVWrapBox. The result is that the GtkVWrapBox shrinks the GtkButtons it contains to fit the space it is allowed by the GtkWindow : this shrinkage is not a desired effect. I am able to compute the space needed by the GtkVWrapBox to display the GtkButtons full size. (by means of gtk_widget_size_request on the GtkButtons it contains) The problem is : --- When the GtkWindow is resized with the mouse, I can't have it resized according to the constraints I have calculated with gtk_widget_size_request. When the GtkWindow is resized with the mouse, it seems to receive two signals from the window manager(?) : 1) size-request and 2) size-allocate I tried the following strategies to solve my problem : 1)Issue a gtk_widget_set_size_request on the GtkWindow in the size-request callback. 2)Issue a gtk_widget_set_size_request on the GtkWindow in the size-allocate callback. 3)Issue a gtk_window_setsize (GTK) on the GtkWindow in the size-request callback. 4)Issue a gtk_window_setsize (GTK) on the GtkWindow in the size-allocate callback. 5)Issue a gdk_window_setsize (GDK) on the GtkWindow-window in the size-request callback. 6)Issue a gdk_window_setsize (GDK) on the GtkWindow-window in the size-allocate callback. 7)Issue a gtk_window_set_geometry_hints on the GtkWindow in the size-request callback. 9)Issue a gtk_window_set_geometry_hints on the GtkWindow in the size-allocate callback. I also programmed my GtkWindow with gtk_window_set_geometry_hints to have it resized by increments (increment in height : the height of a GtkButton inside my GtkVWrapBox / increment in width : the width of a GtkButton inside my GtkVWrapBox) HINT : -- The GIMP also embarks a GtkWrapBox. When the window is resized with the mouse, it does so by moving its right-bottom corner by increments. But the trick is that if the height is reduced and the GtkVWrapBox is on the brink of creating a new column to compensate for the loss of height, the GtkWindow ANTICIPATES by both decrementing its height and incrementing its width AT THE SAME TIME. Does anyone knows how to do that ? Thanks. -- View this message in context: http://www.nabble.com/Window-resize-tp18524560p18524560.html Sent from the Gimp Developer mailing list archive at Nabble.com. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Window resize
Hi, if you have questions on using GTK+, please ask on gtk-list or gtk-app-devel-list. Thanks. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer