On Apr 20, 2016, at 21:43 , Roland King <r...@rols.org> wrote:
> 
> I’m fairly sure the NSTextField doesn’t properly take account of the border 
> when aligning baselines.

Turning off the border fixes half of the problem — the baseline alignment. I 
agree the borderless text field doesn’t look bad, but it makes me uncomfortable 
because it the text field looks disabled (at least when it’s empty).

The other half of the problem — the text field background and the text 
highlight background being one pixel too short at the bottom — isn’t fixed by 
this. The descenders still go all the way to the bottom of the highlight (on my 
non-Retina display — it may look better on a Retina display).

What does fix it:

3) Change the text field height from 21 to 22, using an autolayout height 
constraint. This leads me to speculate that the layout refers to a centerline 
that’s being rounded the “wrong” way when the height is odd.

However, I don’t want to use this fix either, because it prevents the text 
field from having the correct height, if the system font is a different size on 
other localizations, or if sizes change for any reason in the future. So I 
chose:

4) Let it be wrong, in the hope that an OS X update will fix it.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to