Re: Change viewport size requisition?
- From: Jeff Garzik <jgarzik pobox com>
- To: gtk-devel-list redhat com
- Subject: Re: Change viewport size requisition?
- Date: Sat, 28 Nov 1998 19:04:58 -0500 (EST)
Owen Taylor wrote:
>
>
> I'm about to commit the patch gtk-rao-981125, which
> adds the long-requested feature of GTK_POLICY_NEVER
> to the scrolled window. But I notice that it really
> isn't as useful as it should be because of an
> odditity in the way the Viewport widget works.
>
> Instead of reporting a requisition equal to the
> size of it's child plus borders, it always reports
> a requisition of just the size of the borders. This
> means that the GTK_POLICY_NEVER can't be used
> to make a scrolled_window "snap" to the size of the
> child in one direction.
>
> I'd like to change the viewport so that the requested
> area includes the size of the child. This may
> cause some backwards-incompatibility for programs
> that don't set the usize of scrolled windows and
> assume that their size will be determined by surrounding
> widgets, however such programs can be fixed by the
> simple expedient of:
>
> gtk_widget_set_usize (scrolled_window, 0, 0);
>
> I don't see any other way to enable users to get
> the IMO, very useful above "snapping" behavior
> without gross hacks.
>
> Comments?
1) Thanks. I've wanted POLICY_NEVER for a long time. :)
2) The usize change will break a lot of things. I think it is
important to let a widget resize itself based on overall window size,
without programmer intervention. Can't you call
gtk_widget_set_usize (scrolled_window, 0, 0);
in widget setup, unless otherwise directed to by the programmer?
Jeff
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]