From: Tony H. <h...@re...> - 2004-04-21 22:32:40
|
In <200...@ev...>, Thomas Leonard wrote: > On Tue, Apr 20, 2004 at 04:39:27PM +0100, Tony Houghton wrote: > > In <408...@so...>, Ken Hayber wrote: > > > So can you simply change your W after getting the H from your base widget? > > > Or does that still trigger the +2, +4 issue? > > > > The trouble is you can't just request a change of width, you need to > > request width and height at once. I've tried passing -1 for the height > > which is supposed to request the "natural" size, but that doesn't help. > > Well, that *should* work. What happens? It does the same as repeating the size from the allocation event without subtracting anything. It seems to make the panel grow by 2 pixels so I get another allocation event 2 pixels bigger, and the panel grows and grows. Basically, whatever I pass to gtk_widget_set_size_request, I get another allocation 2 pixels bigger, so I have to test for that and ignore it. > You could also just pass a minimum > value (8 or so). That means that panel containing your applet must allow > it to be at least 8 pixels high, but beyond that it won't increase or > limit the size. Yes, I suppose that could work in this case. I'll have to try it and see if it then allows the panel to be reduced without that animation effect. It wouldn't work for tgauge in its current form though, because that wants to know how big a pixmap to put in the GtkPixmap, which in turn presumably sets the size request. -- TH * http://www.realh.co.uk |