Re: Extended Layout incubator branch.
- From: Tristan Van Berkom <tvb gnome org>
- To: Matthias Clasen <matthias clasen gmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: Extended Layout incubator branch.
- Date: Sun, 25 Apr 2010 17:43:08 -0400
On Sun, Apr 25, 2010 at 5:08 PM, Matthias Clasen
<matthias clasen gmail com> wrote:
> On Fri, Apr 23, 2010 at 11:16 PM, Matthias Clasen
> <matthias clasen gmail com> wrote:
>
>> So far, I have found two things that don't seem to work quite right:
>>
>> 1) In testellipsize, when rotating without any ellipsization, the text
>> just 'rotates out' of the allocation, whereas in ellipsized modes, the
>> allocation is grown to accomodate the rotated label, as far as
>> possible.
>
> This is caused by the two get_size_for_allocation calls in
> gtk_label_get_desired_size.
> Simply commenting out those branches and always doing
>
> *minimum_size = required_rect.width;
> *natural_size = natural_rect.width;
>
> fixes the behaviour in testellipsize, and doesn't seem to affect any
> of the examples in extendedlayoutexample. Why did you add those
> special cases again ?
I added them while trying to get the vertical wrapping labels
doing w4h.
The intention was to ensure the minimum size in the backwards
request mode. A horizontal label likes to be asked its width but
returns an invented value for the height; so when asked for its
desired height it returns the desired heights for the minimum width.
It seems the required_rect in this case is rendered with the minimum
width making the required_rect.height be the correct value anyway.
In this case we should at least do:
natural = MAX (minimum, natural);
To make sure the label is responding to the api correctly.
>
>>
>> 2) The 'flipping' example in testgtk shows trouble with RTL labels.
>> The are drawn outside of the button thats supposed to contain them.
>>
>
> This turned out to be a minor problem that has crept in when merging
> the pack-start and pack-end loops in gtk_box_size_allocate. I've
> committed a fix.
>
Great, thanks.
Cheers,
-Tristan
>
> Matthias
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]