Re: Bug in get_preferred_height_for_width() [was Re: Minimum height for minimum width]
- From: Havoc Pennington <hp pobox com>
- To: Tristan Van Berkom <tristanvb openismus com>
- Cc: Owen Taylor <otaylor redhat com>, gtk-devel-list gnome org
- Subject: Re: Bug in get_preferred_height_for_width() [was Re: Minimum height for minimum width]
- Date: Fri, 15 Oct 2010 13:47:27 -0400
Hi,
On Fri, Oct 15, 2010 at 11:32 AM, Havoc Pennington <hp pobox com> wrote:
>
> Without trying to code it and see if it works, it could look like:
>
> (* adjust_size_allocation) (GtkWidget *widget,
> GtkOrientation orientation,
> gint *for_size_opposite,
> gint *natural_size,
> gint *offset,
> gint *adjusted_size);
>
> where all four numbers are changing as we're chaining Widget->Container->Button
>
> Might be nicer to do struct GtkAllocatedSize { int for_size_opposite;
> int natural_size; int offset; int adjusted_size } ?
>
> Sorry I got this wrong in my original patch :-/
>
A nice cleanup this could enable would be to just do the alignment and
margins completely separately in gtkwidget.c. i.e. gtkwidget.c would
effectively have two adjustments.
real_adjust_size_allocation(widget, orientation, allocated_size) {
adjust_allocation_margin(widget, orientation, allocated_size);
adjust_allocation_alignment(widget, orientation, allocated_size);
}
and same for request. i.e. "stack" the adjusts here, just as Container
stacks on Widget
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]