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

Add BrowserWindow.get/setContentBounds() #6654

Merged
merged 15 commits into from Aug 5, 2016

Conversation

Projects
None yet
2 participants
@kevinsawicki
Copy link
Contributor

kevinsawicki commented Jul 29, 2016

This pull request adds a new getContentBounds() API to BrowserWindow that returns the x, y, width, and height of the content area.

This will allow apps to know the size of the window chrome by comparing the content bounds to the window bounds.

Closes #6536

@kevinsawicki kevinsawicki force-pushed the content-bounds branch from 271e409 to 5045f01 Jul 29, 2016

@zcbenz

This comment has been minimized.

Copy link
Member

zcbenz commented Jul 30, 2016

We can probably refactor the ContentSizeToWindowSize/WindowSizeToContentSize to ContentBoundsToWindowBounds/WindowBoundsToContentBounds and implement getContentBounds based on it, so we don't have to implement getContentBounds for each platform, and it would be much easier to add setContentBounds.

@kevinsawicki kevinsawicki force-pushed the content-bounds branch 4 times, most recently from 20c8d97 to 674bdf2 Aug 4, 2016

@kevinsawicki kevinsawicki force-pushed the content-bounds branch from 674bdf2 to a190495 Aug 4, 2016

@kevinsawicki kevinsawicki changed the title Add BrowserWindow.getContentBounds() Add BrowserWindow.get/setContentBounds() Aug 4, 2016

@kevinsawicki kevinsawicki force-pushed the content-bounds branch from d864f5f to dbddf50 Aug 4, 2016

@kevinsawicki

This comment has been minimized.

Copy link
Contributor Author

kevinsawicki commented Aug 4, 2016

@zcbenz thanks for the great feedback, I've adjusted those methods accordingly and added setContentBounds in this pull request as well.

@zcbenz

This comment has been minimized.

Copy link
Member

zcbenz commented Aug 5, 2016

👍

@zcbenz zcbenz merged commit 8a33464 into master Aug 5, 2016

8 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
electron-linux-arm Build #3774790 succeeded in 51s
Details
electron-linux-ia32 Build #3774791 succeeded in 47s
Details
electron-linux-x64 Build #3774792 succeeded in 93s
Details
electron-mas-x64 Build #2100 succeeded in 7 min 42 sec
Details
electron-osx-x64 Build #2100 succeeded in 7 min 35 sec
Details
electron-win-ia32 Build #1122 succeeded in 6 min 28 sec
Details
electron-win-x64 Build #1106 succeeded in 6 min 43 sec
Details

@zcbenz zcbenz deleted the content-bounds branch Aug 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.