Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add zoomToPageWidth window option #7776
This pull request adds support for a
This allows apps to opt-in to a more "native" feeling zoom behavior where their windows grow the full height of the screen but only expands to the needed width, such as the how the Finder handles zoom.
This was inspired by Chrome's implementation of this in chrome/browser/ui/cocoa/browser_window_controller.mm.
New behavior with
This looks great to me - I think it'd definitely be useful for N1. We have a few window types (like the email composer) that really shouldn't be more than 800px wide or so, and it'd be nice for maximizing to stop there.
Could we add a note to the docs to mention how the page width is determined? I'm actually not sure how Chrome computes the intrinsic width of the document.