Development:Editing Nibs

From Camino Wiki
Revision as of 21:27, 2 July 2006 by Froodian (talk | contribs)
Jump to navigation Jump to search

Follow the general guidelines in the Aqua Human Interface Guidelines about positioning controls and center-equalization, with exceptions as noted below.

  • Be sure you do not break the focus and tab cycle (both normal and Full Keyboard Access) when adding or changing controls in nibs.
  • Make sure the initialFirstResponder is correctly set to the first element which should have focus (even though Bug 327203 currently blocks this in prefPanes).
  • It's important that all prefPane windows have a width of 595 px (since they will be forced to that dimension in the actual prefs window).
  • Be sure that all items bounding boxes resemble the actual size of the item it encloses as closely as possible, especially vertically for text.
  • Application names in nibs should be capitalized. Any quotations should use curly quote characters. Omit the comma before the last item in a series.
  • Capitalize pref names that are sentences like sentences (aside from also capitalizing the first word in the "option" part of the sentence), and capitalize all words in pref names that are fragments.
  • As per the HIG, buttons which have further actions receive an ellipsis ("…"). Many times this means that the ellipsis should follow buttons which open sheets, but not buttons which open windows. Use the real elipsis character (opt-; on a US keyboard), not three periods.
  • website, web pages, Internet, URL, Location bar, pop-up, text field.

When modifying nibs, keep the following template in mind (from discussion over Bug 308942).

Error creating thumbnail: Unable to save thumbnail to destination

Despite the image above, all hint text should be left-aligned with the left edge of the widget for which the text provides a hint.

N.B. In the “Great prefPane Correction of 2006”, we discovered a number of layout/display differences between 10.3 and 10.4, so it is imperative that those modifying nibs make sure that the nib is tested on both 10.3 and 10.4 as long as we support 10.3 to prevent breakage.

For instance, hint text that is left-aligned with the left edge of the widget for which the text provides a hint on 10.4 will be indented 3px to the right on 10.3, and, much more seriously, bounding boxes that are sized very tightly to the text on 10.4 will often be 2-3px too small on 10.3, leading to odd/broken wrapping or the disappearance of words altogether!
In these two cases, we take the alignment of the hint text on 10.4 as canonical, since it does not "break" anything on 10.3, but for the bounding box sizes, we take the appearance on 10.3 to be canonical to prevent breakage.