Re: Text field alignment
Re: Text field alignment
- Subject: Re: Text field alignment
- From: Quincey Morris <email@hidden>
- Date: Thu, 21 Apr 2016 10:51:02 -0700
- Feedback-id: 167118m:167118agrif8a:167118sXuKR8AlgJ:SMTPCORP
On Apr 20, 2016, at 21:43 , Roland King <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden