[Top][All Lists]

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

Re: Pixel-aligned autoresizing

From: Fred Kiefer
Subject: Re: Pixel-aligned autoresizing
Date: Sat, 09 Jul 2011 00:54:40 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv: Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11

On 08.07.2011 23:56, Eric Wasylishen wrote:

On 2011-07-08, at 2:27 AM, Fred Kiefer wrote:

On 08.07.2011 09:34, Eric Wasylishen wrote:
On 2011-07-07, at 4:19 PM, Fred Kiefer wrote:
On 07.07.2011 10:16, Eric Wasylishen wrote:
On a related note, I added a test case for autoresizing to

It looks like we have some differences from cocoa unrelated to
rounding, but related to how extra space is divided between the lower
margin, view size, and upper margin when NSViewMinXMargin or
MaxXMargin is combined with NSViewWidthSizable.

I tried to fix the autoresizing behaviour and now it passes the first of your 
tests. Looks like we will need to add the pixel alignment to pass the second 
one :-)

Ok, great! I committed a slightly improved version of my rounding patch, and 
now both tests pass.

It looks like switching to the proportional autoresizing has cause a few 
glitches in gui; the colour pickers aren't showing up, and the font panel 
doesn't resize properly when stretched horizontally. Hopefully these will be 
easy to fix.

Thank you for spotting this. I noticed a strange problem with the NSBox test in 
GSTest and put in the check if options is greater than 0.0 to work around that. 
I hadn't noticed the other ones. Most likely there is a common cause (maybe 
related to negative coordinate?), we just need to find and fix it.

The good thing is that your change requires that people have to recompile all 
their libraries and applications. This should buy us time to fix the problem 
before they notice.

I found and fixed the main problem, which was not handling cases where the sum 
of the flexible space is 0. I added some more tests for this as well, which are 
all passing now.

I think NSFontPanel will need some manual tweaking so it resizes properly, 
maybe we can change it to use a GSHBox to hold the columns.

Back to the original topic of this thread: Do you think your alignment change 
allows us to remove the rounding we do in the cairo backend and still get nice 
results for the normal cases or is more adjustment in gui needed?

I think it's safe to do. I went ahead and removed most of the rounding in 
cairo. If it causes serious problems we can always revert but things look OK to 
me. Also, the PixelExactDrawing-test is now very close to Cocoa.


thank you very much for the great work you are doing here!


reply via email to

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