Titlebar accessory regression for toolbar-based windows
| Originator: | zwaldowski | ||
| Number: | rdar://19850278 | Date Originated: | 16-Feb-2015 03:52 PM |
| Status: | Open | Resolved: | false |
| Product: | OS X SDK | Product Version: | Mac OS 10.10.3 (14D72i), Xcode Version 6.1.1 (6A2008a) |
| Classification: | Other Bug | Reproducible: | Sometimes |
Summary: I'm pleased with the introduction NSTitlebarAccessoryViewController - a much better alternative than fishing around with subviews. However, the ability to deliver window widgets limited to the space occupied by the title and traffic lights has regressed with the introduction of the API. Height-limited accessory widgets are useful for a couple of scenarios in Mac application development, such as: - A custom view switching "traffic light" (such as in iTunes) - A low-impact indicator for apps in "Trial" or "Unregistered" mode outside the App Store (such as Panic Transmit) - Indicators, such as for syncing or other progress - Important mode switching, such as the Time Zone drop-down in Calendar on previous versions of OS X - Legal- or corporate-imposed confidentiality indicators (Apple folks, you guys should know all about this) The regression occurs when windows with widgets bound to the top-right must be combined with toolbars, such as in a tabbed Preferences-style interface (allowed, for instance, with the new NSTabViewController). Steps to Reproduce: 1. Create a title-visible NSWindow with a toolbar 2. Give the toolbar a set of items including an item at the far right 3. Create a single-line text field and add it as a subview in an instance of NSTitlebarAccessoryViewController. 4. Insert the accessory into the window Practical use-case scenario: Subclass of NSTabViewController that adds a search field to the right, as the root of a window with a titlebar accessory Expected Results: There should be a way to specify that titlebar accessories should only share the space occupied by the window title, pushing over toolbar items when such a situation is impossible. In a window with the title visible, and given a height-limited right-anchored titlebar accessory, a right-anchored toolbar item should be flush with the right side of the window. In a window without the title visible, a right-bound titlebar accessory should push over toolbar items (as is the current case). Actual Results: Titlebar accessory widgets always push over toolbar items. Notes: SPI/hacky workaround: -[NSWindow _toolbarTrailingSpace]. Configuration: Occurs on every public release of OS X 10.10 (Yosemite).
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
This issue persists in Mac OS X 10.11 Developer Beta 2.