Re: window sizing patch



Tim Janik <timj gtk org> writes:

> On 6 Aug 2001, Havoc Pennington wrote:
> 
> > 
> > Hi,
> > 
> > This patch is a month or more old now - it needs to go in ASAP,
> > because it needs testing, and changes API.
> > 
> > So, I'm going to commit in a day or two unless it gets reviewed and
> > specific issues are brought up.
> > 
> > This closes two API bugs:
> >  http://bugzilla.gnome.org/show_bug.cgi?id=52574
> >  http://bugzilla.gnome.org/show_bug.cgi?id=53151
> 
> does this incorporate the changes owen pointed out to you
> last time? i'd rather go over it once than twice...

You never responded to my mail on this issue, so I think
Havoc was holding off until you did respond before
implementing the changes, since they differed from
what you and Havoc agreed upon. (Mail appended)

Let's go ahead and get what Havoc has now in the tree. It's
been outstanding _far_ too long, we are 99% agreed on
this, and we are just preventing people from testing
the new code.

We can deal with my 1% changes as a separate issue afterwards.

Regards,
                                        Owen


======

The particular thoughts I had about behavior that Havoc was
referring to are:

 * There should be a public "gtk_window_resize_to_default()"
   function that resizes the window to its computed default
   size without remapping.

   In the few cases where 

   For instance, if the GIMP wanted autoshrink/grow on zoom
   behavior, it would, properly:

     - Set the canvas as the geometry widget
     - Set the default size of the window to the size of 
       the zoomed image, assuming that this is smaller
       than size-of-screen - some amount.
     - When the zoom scale changes, call gtk_window_resize_to_default()

   The default size is something that apps don't have access
   to, so gtk_window_resize() is not sufficient.

 * With that function, and Havoc's behavior of "reposition on
   hide/show", I don't see any reason to have the
   gtk_window_reshow_initial() [ forget the exact name ] function 
   for GUI builders.

 * I don't see why unrealizing should be special and make the
   window forget the current size. What is the benefit?
   If the toolkit has some reason to unrealize the widget,
   we shouldn't throw away the information about the current
   size of the window. Apps shouldn't call gtk_widget_unrealize()
   ever.

Regards,
                                        Owen

   
   




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