• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Text field alignment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text field alignment


  • Subject: Re: Text field alignment
  • From: Roland King <email@hidden>
  • Date: Thu, 21 Apr 2016 12:43:40 +0800

> On 21 Apr 2016, at 11:13, Quincey Morris <email@hidden> wrote:
>
> I’m laying out some views (using auto-layout, though I don’t think that’s the cause of the problem) on OS X 10.11.4 with Xcode 7.3. In many cases, I’m baseline-aligning a pair of text fields, one label and one editable. The font is the default (System-Regular, i.e. 13 pt) and the text field heights are default too.
>
> Unfortunately, the label and the text field are not baseline aligned, but the text field contents are one point too low. It looks wrong, too, because it’s too close to the bottom of the enclosing box, and when selected there is more highlighted empty space above the text than below.
>
> I can sort of fix it by playing around with the text field heights and/or offsetting the constraints, but I don’t really want to because it seems like a mistake to design for this particular quirk.
>
> Has anyone else run into this, or got any suggestions about what (if anything) to do about it?
>

Yes  - I believe your options, as well as filing a bug are

1) turn the border off on the textfield (I can hardly notice the difference myself and this also puts the highlight properly inside the space in the box.

or

2) adjust the baseline alignment constraint constant to 1, or -1, depending on which field is first in your constraint.

I’m fairly sure the NSTextField doesn’t properly take account of the border when aligning baselines.
_______________________________________________

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


  • Follow-Ups:
    • Re: Text field alignment
      • From: Quincey Morris <email@hidden>
References: 
 >Text field alignment (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Correct way to specify anchors with NSURL?
  • Next by Date: Re: Correct way to specify anchors with NSURL?
  • Previous by thread: Re: Text field alignment
  • Next by thread: Re: Text field alignment
  • Index(es):
    • Date
    • Thread