Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: flexible autoresize for BrowserViews #16184

Merged
merged 3 commits into from Jan 31, 2019

Conversation

summeroff
Copy link
Contributor

@summeroff summeroff commented Dec 24, 2018

Flexible autoresize for BrowserViews in BrowserWindow

As support for multy BrowserView in BrowserWIndow added in PR #16148. How current autoresize options work is not always suitable to what app developer can need when some browser views resize together. It is because width and height autoresize modes change view by same amount what windows changed.

This commit add two new options horizontal and vertical. With this options enabled, a browserview will autoresize not only dimensions but position on window too. And in a way that keep proportions the same.

For example we add two views.
view1 x:100 width:100 and view2 x:200 width:200 in window with width 400.
And if user change window width to 800 then autoresize updates views to view1 x:200 width:200 and view2 x:400 width:400

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • tests are changed or added
  • relevant documentation is changed or added
  • PR title follows semantic commit guidelines
  • PR release notes describe the change in a way relevant to app-developers

Release Notes

Notes: Added flexible autoresize option for BrowserViews in BrowserWindow.

@summeroff summeroff requested review from a team December 24, 2018 02:34
@summeroff summeroff force-pushed the sl_browser_view_autoresize_master branch from 6dce162 to 6ef9b13 Compare January 7, 2019 17:27
@zcbenz zcbenz force-pushed the sl_browser_view_autoresize_master branch 2 times, most recently from 47c040b to 73397b1 Compare January 28, 2019 08:56
@zcbenz zcbenz force-pushed the sl_browser_view_autoresize_master branch from 73397b1 to 614b05a Compare January 30, 2019 12:13
@zcbenz zcbenz merged commit 49ec7e1 into electron:master Jan 31, 2019
@release-clerk
Copy link

release-clerk bot commented Jan 31, 2019

Release Notes Persisted

Added flexible autoresize option for BrowserViews in BrowserWindow.

summeroff added a commit to stream-labs/electron that referenced this pull request Apr 22, 2019
* feat: flexible autoresize for BrowserViews

* fix: change to static_cast

* Slight format code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants