Re: titlebar accessory? window:willPositionSheet:usingRect: not called in full-screen mode
Re: titlebar accessory? window:willPositionSheet:usingRect: not called in full-screen mode
- Subject: Re: titlebar accessory? window:willPositionSheet:usingRect: not called in full-screen mode
- From: Lee Ann Rucker <email@hidden>
- Date: Wed, 04 Mar 2015 19:12:31 +0000
- Thread-topic: titlebar accessory? window:willPositionSheet:usingRect: not called in full-screen mode
On Mar 4, 2015, at 8:13 AM, Corbin Dunn <email@hidden> wrote:
>
>> On Feb 27, 2015, at 2:26 PM, Lee Ann Rucker <email@hidden> wrote:
>>
>>
>> On Feb 27, 2015, at 9:24 AM, Corbin Dunn <email@hidden> wrote:
>>
>>>
>>>> On Feb 25, 2015, at 9:40 AM, Lee Ann Rucker <email@hidden> wrote:
>>>>
>>>>> Great, because that's exactly what I'm using it for
>>>>
>>>> The toolbar case or the "certain control" one? When you're in fullscreen mode, the toolbar isn't actually attached to your window. It's attached to a separate one so it can slide down with the menubar. But if it’s the control, it wouldn't surprise me if Apple forgot they'd mentioned that option and didn't think about it when they decided whether this delegate method needed to be called.
>>>
>>> This was thought about. The delegate isn’t called because, as you all noted, the sheet is appearing in another window that the application doesn’t own. AppKit takes care of drawing the titlebar, toolbar, and titlebar accessory views (new to 10.10). Sheets are designed to drop below all these, and move with the window when the menu bar drops down.
>>
>>
>> titlebar accessory? oooh.....
>>
>> ... some hours later: Is there any way to configure its autolayout so it doesn't overlap the title text, and especially the buttons?
>
>
> For an item that is set to align to NSLayoutAttributeBottom, we assume whatever height you set is preferred, and fill the width to be the width of the window.
>
> For an item that is set to align to NSLayoutAttributeRight, we assume whatever width you set is preferred, and fill the height to match the height of the titlebar area.
>
> So, armed with that info, just don’t set the width to be large enough to overlap the window title text.
That's not so easy; is there a public way to determine that? The available space changes as the window resizes & title changes, which is why autolayout would be better.
>
> -corbin
>
> PS: thank you for logging the bugs on this
Thanks for looking at it - I spent two days getting the autolayout to work (I'll file another bug once I polish the sample app; it keeps adding autoresizing mask constraints that conflict with my width constraint), and then once I had a toolbar it turned out I couldn't use it at all.
_______________________________________________
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