How should windowWillUseStandardFrame:defaultFrame: work? With a WebView?
How should windowWillUseStandardFrame:defaultFrame: work? With a WebView?
- Subject: How should windowWillUseStandardFrame:defaultFrame: work? With a WebView?
- From: Daryle Walker <email@hidden>
- Date: Mon, 11 Aug 2014 14:38:41 -0400
I’m thinking of implementing the (optimized) zoom green button. I need to provide a windowWillUseStandardFrame:defaultFrame: method to do that. I’ve read that the trial frame space given takes out room for the menu bar and the dock. Does it also remove space for the window’s chrome? That chrome is currently 20 pts on top, but I think it’s been different in the past, including side and bottom borders. If not, is there an official method to find out either the window’s chrome space or user-customizable space?
For my app, the user-customizable space is the official NSToolbar, a custom top border, a custom bottom border, and a WebView between the two borders. All but the WebView may be arbitrarily turned off. I guess I use the current state of those three areas to subtract from the total vertical space to see how much vertical room the WebView can have.
How can the optimized space for a WebView be determined? (In other words, given an infinite screen size, how much space would a WebView need to show the entirety of its current page?) I read that you need some difficult internal calculation with JavaScript; I hope not.
—
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com
_______________________________________________
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