gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with text in buttons


From: Fred Kiefer
Subject: Re: Problem with text in buttons
Date: Mon, 07 Jan 2013 00:41:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 06.01.2013 09:40, Fred Kiefer wrote:
Thank you for reporting this. Most likely I caused that with my recent string 
drawing changes. I will be looking into this later today.

Fred

On the road

Am 06.01.2013 um 13:19 schrieb Germán Arias <address@hidden>:


To see this problem:

1) Run Gorm.
2) Select in menu "Document -> New application".
3) Close Gorm.
4) The titles of buttons at alert panel aren't centered.

It turns out that this problem was caused by a change I made in the horizontal typesetter. There when the width of the text container is above 1e7 we now ignore the alignment attribute, just as Apple does. This change is correct, but it requires an additional change in the string drawing code. There we can no longer reuse a layout manager that has been set up without a container size when we require the layout in a container with a given size. That change itself was easy to make and is now in the code. But it has a big downside. Now when we first ask for the size of the attributed string and later draw it, we now longer find the layout already in that cache. Most likely this was the biggest source of cache hits that we had and now they are gone, the string needs to be processed twice. We really need a better solution here. The old code was incorrect as it did give different results from what Apple displayed, but the new code is inefficient, which is almost as bad.

Any help here to come up with a better way is highly appreciated.
Fred







reply via email to

[Prev in Thread] Current Thread [Next in Thread]