• 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: How to calculate NSToolbar height in fullscreen mode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to calculate NSToolbar height in fullscreen mode


  • Subject: Re: How to calculate NSToolbar height in fullscreen mode
  • From: Nava Carmon <email@hidden>
  • Date: Tue, 25 Sep 2012 14:07:30 +0200

It's good to know that I'm not alone in this ordeal :), though it doesn't solve the problem.
The height of toolbar (as it returned by the function, that I took from Apple's example) before entering the FS is some 50 pix.
Measured height of the same toolbar in FS is 63 pix (both are without title bar). So I cannot use the cached toolbar height. That's what I'm asking whether there is an API, that returns it?
Because if i set the frame of the window in FS mode to be as NSScreen's frame the detached toolbar will cover the upper part of the window (even before sliding down with the menu bar), which I want to prevent.

Best Regards,

Nava Carmon,

Moshiach Times Ltd.,

e-mail: email@hidden
Skype: navacarmon
Phone: +972.52.8157770




On Sep 24, 2012, at 9:07 PM, Lee Ann Rucker wrote:

>
> 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

  • Follow-Ups:
    • Re: How to calculate NSToolbar height in fullscreen mode
      • From: Lee Ann Rucker <email@hidden>
References: 
 >How to calculate NSToolbar height in fullscreen mode (From: Nava Carmon <email@hidden>)
 >Re: How to calculate NSToolbar height in fullscreen mode (From: Lee Ann Rucker <email@hidden>)

  • Prev by Date: Re: Why does Xcode claim a lib has no ARMv7 "slice", when lipo shows that it's all ARMv7?
  • Next by Date: Re: autosavesInPlace and sandbox
  • Previous by thread: Re: How to calculate NSToolbar height in fullscreen mode
  • Next by thread: Re: How to calculate NSToolbar height in fullscreen mode
  • Index(es):
    • Date
    • Thread