Re: How to calculate NSToolbar height in fullscreen mode
Re: How to calculate NSToolbar height in fullscreen mode
- Subject: Re: How to calculate NSToolbar height in fullscreen mode
- From: Lee Ann Rucker <email@hidden>
- Date: Mon, 24 Sep 2012 12:07:36 -0700
On Sep 24, 2012, at 5:50 AM, Nava Carmon wrote:
> Hi,
>
> I have to perform custom animation for NSWindow transition to full screen mode. The window have a NSToolbar in icons-only mode with custom items.
> How to calculate properly the final frame of such a window in full screen? Seems, that the height of the toolbar in the fullscreen is not the same as in regular mode (not including title).
>
> Thanks
>
> Best Regards,
>
> Nava Carmon,
>
rdar://12144703
http://openradar.appspot.com/12144703
In window:startCustomAnimationToExitFullScreenWithDuration:, I know the target contentRect but I can't use -frameRectForContentRect: to find the target frameRect because the window style is still fullscreen, and can't use +frameRectForContentRect:styleMask: because it doesn't know about the toolbar.
Because all the windows using the same toolbar get updated when the toolbar style changes, I can't just save the window and/or toolbar size before going into fullscreen because it may not be valid when I exit.
Though if you always keep the same toolbar style and size you should be able to cache the toolbar height from before you enter FS and restore it coming out; even if it is different in FS (something I've never seen) it's the standard window you care about. The FS window always covers the entire screen; the toolbar slides down over it and you don't need to worry about it. It's not even a child of your window at that point, it's got a special window it lives in.
_______________________________________________
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