Re: GtkSizeGroup breakage (was Re: questions re: aux info, size request)

2010-09-14 Thread Matthias Clasen
On Tue, Sep 14, 2010 at 3:06 PM, Tristan Van Berkom wrote: >   >  Note that only non-contextual sizes of every widget are ever consulted >  by size groups (since size groups have no knowledge of what size a >  widget will be allocated in one dimension, it cannot derive how much >  height a widget

Re: GtkSizeGroup breakage (was Re: questions re: aux info, size request)

2010-09-14 Thread Tristan Van Berkom
On Tue, 2010-09-14 at 12:45 -0400, Matthias Clasen wrote: > This is indeed quite a brain teaser. > > I don't think your current approach of incrementally bumping the size > group requisition does even work correctly. How does the size group > requisition ever become smaller again ? The pre-hfw siz

Re: GtkSizeGroup breakage (was Re: questions re: aux info, size request)

2010-09-14 Thread Matthias Clasen
This is indeed quite a brain teaser. I don't think your current approach of incrementally bumping the size group requisition does even work correctly. How does the size group requisition ever become smaller again ? The pre-hfw sizegroup code always looped over all widgets to determine the size gro

GtkSizeGroup breakage (was Re: questions re: aux info, size request)

2010-09-13 Thread Tristan Van Berkom
On Sun, 2010-09-12 at 01:01 -0400, Havoc Pennington wrote: > Hi, > > On Sun, Sep 12, 2010 at 12:45 AM, Tristan Van Berkom > wrote: > > While on this topic, there's this XXX comment I left dangling > > in gtksizegroup.c: > > http://git.gnome.org/browse/gtk+/tree/gtk/gtksizegroup.c#n677 > > > > I

Re: questions re: aux info, size request

2010-09-13 Thread Havoc Pennington
Hi, On Mon, Sep 13, 2010 at 7:06 AM, Tristan Van Berkom wrote: > Heh, do you mean GtkWindow widgets or GtkWidgets that have their own > GdkWindow ? Widgets that have their own GdkWindow i.e. I was proposing that when adjusting a size request, if (gtk_widget_get_window(widget)) { if (*minimum

Re: questions re: aux info, size request

2010-09-13 Thread Tristan Van Berkom
On Sun, 2010-09-12 at 12:53 -0400, Havoc Pennington wrote: > Hi, > > On Sun, Sep 12, 2010 at 1:33 AM, Tristan Van Berkom > wrote: > > Ok I see, so we end up with: > > - set_size_request() Can be used to increase the minimum request > > I was thinking this should stay backward compatible and all

Re: questions re: aux info, size request

2010-09-12 Thread Havoc Pennington
Hi, On Sun, Sep 12, 2010 at 1:33 AM, Tristan Van Berkom wrote: > Ok I see, so we end up with: >  - set_size_request() Can be used to increase the minimum request I was thinking this should stay backward compatible and allow lowering it, fwiw. Though I can't actually come up with a use case, I'm

Re: questions re: aux info, size request

2010-09-11 Thread Tristan Van Berkom
On Sun, 2010-09-12 at 01:01 -0400, Havoc Pennington wrote: > Hi, > > On Sun, Sep 12, 2010 at 12:45 AM, Tristan Van Berkom > wrote: > > While on this topic, there's this XXX comment I left dangling > > in gtksizegroup.c: > > http://git.gnome.org/browse/gtk+/tree/gtk/gtksizegroup.c#n677 > > > > I

Re: questions re: aux info, size request

2010-09-11 Thread Havoc Pennington
Hi, On Sun, Sep 12, 2010 at 12:45 AM, Tristan Van Berkom wrote: > While on this topic, there's this XXX comment I left dangling > in gtksizegroup.c: >   http://git.gnome.org/browse/gtk+/tree/gtk/gtksizegroup.c#n677 > > I was thinking maybe that for all the widgets in a group to be > effectively t

Re: questions re: aux info, size request

2010-09-11 Thread Tristan Van Berkom
On Sat, 2010-09-11 at 21:05 -0400, Matthias Clasen wrote: > On Sat, Sep 11, 2010 at 7:58 PM, Havoc Pennington wrote: > > > > > Anyhow: it would be a shame to ship the "ignore set size request > > smaller than min size" by accident. Should I open a bug? Or should I > > change (and document) set_si

Re: questions re: aux info, size request

2010-09-11 Thread Matthias Clasen
On Sat, Sep 11, 2010 at 7:58 PM, Havoc Pennington wrote: > > Anyhow: it would be a shame to ship the "ignore set size request > smaller than min size" by accident. Should I open a bug? Or should I > change (and document) set_size_request to "increase only"? Sounds good to me. ___

Re: questions re: aux info, size request

2010-09-11 Thread Havoc Pennington
Hi, Just thinking, in the new GtkSizeRequest world it's probably more useful to set natural size than minimum size. With Clutter, what we often find ourselves wanting to do at litl is "set natural size, clamping it to be larger than minimum size" So for example setting natural size to 0 would me

Re: questions re: aux info, size request

2010-09-07 Thread Havoc Pennington
Hi, On Tue, Sep 7, 2010 at 3:49 AM, Tristan Van Berkom wrote: > What is the use-case for forcing a widget to request something smaller > than it's content ? > I think the use-cases are mostly caused by the old limited layout system. For example, to get a label to ellipsize, you used to have to s

Re: questions re: aux info, size request

2010-09-07 Thread Tristan Van Berkom
On Tue, 2010-09-07 at 14:44 +0900, Tristan Van Berkom wrote: > On Sat, 2010-09-04 at 21:37 -0400, Havoc Pennington wrote: > > Hi, > > > > several questions looking at this code, > > Sorry it took me a while to answer this mail. > > > > > 1. I may be nuts but I really thought set_size_request()

Re: questions re: aux info, size request

2010-09-06 Thread Tristan Van Berkom
On Sat, 2010-09-04 at 22:20 -0400, Havoc Pennington wrote: > Also, > > 4. AuxInfo still contains x,y, x_set, y_set and code reads them, but > commit 0d322676dcb06be62329a7d4373c497993509fbd removed set_uposition > and now there is no way to set these - so they should die, right? The removed gtk_w

Re: questions re: aux info, size request

2010-09-06 Thread Tristan Van Berkom
On Sat, 2010-09-04 at 21:37 -0400, Havoc Pennington wrote: > Hi, > > several questions looking at this code, Sorry it took me a while to answer this mail. > > 1. I may be nuts but I really thought set_size_request() could reduce > a size request below the widget's normal request, back in the da

Re: questions re: aux info, size request

2010-09-04 Thread Havoc Pennington
Bugzilla is down, so here's a patch for another problem Havoc From d8b6eb473b0eb13b9540f91516f2f60df2d5f1a7 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 5 Sep 2010 01:42:14 -0400 Subject: [PATCH] default impls of width_for_height,hfw should chain directly not use wrapper API In Gtk

Re: questions re: aux info, size request

2010-09-04 Thread Havoc Pennington
Also, 4. AuxInfo still contains x,y, x_set, y_set and code reads them, but commit 0d322676dcb06be62329a7d4373c497993509fbd removed set_uposition and now there is no way to set these - so they should die, right? Havoc ___ gtk-devel-list mailing list gtk-

questions re: aux info, size request

2010-09-04 Thread Havoc Pennington
Hi, several questions looking at this code, 1. I may be nuts but I really thought set_size_request() could reduce a size request below the widget's normal request, back in the day. However, won't this code allow set_size_request to *increase* min size only? http://git.gnome.org/browse/gtk+/tree/