Skip to content

Add useFullBounds option for getWindowBoundsCentered() and centerWindow()#44

Merged
sindresorhus merged 9 commits intosindresorhus:mainfrom
lacymorrow:fix/41
Apr 6, 2021
Merged

Add useFullBounds option for getWindowBoundsCentered() and centerWindow()#44
sindresorhus merged 9 commits intosindresorhus:mainfrom
lacymorrow:fix/41

Conversation

@lacymorrow
Copy link
Contributor

@lacymorrow lacymorrow commented Mar 13, 2021

This allows for centered windows to ignore the space taken by the Windows taskbar or the MacOS dock so that programs can accurately be centered.

Fixes #41

@lacymorrow
Copy link
Contributor Author

@sindresorhus not sure what you would like to call it but I think includeFullDisplayBounds is better than includeNonworkableArea

@sindresorhus
Copy link
Owner

Maybe useFullBounds?

@sindresorhus
Copy link
Owner

You also need to update index.d.ts.

@lacymorrow
Copy link
Contributor Author

Ready for another review

@sindresorhus
Copy link
Owner

You have a lint violation.

lacymorrow and others added 2 commits March 27, 2021 09:01
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
@lacymorrow
Copy link
Contributor Author

Fixed up

@sindresorhus sindresorhus changed the title Fix #41: Option to include non-workable display area in getWindowBoundsCentered Add useFullBounds option Apr 6, 2021
@sindresorhus sindresorhus changed the title Add useFullBounds option Add useFullBounds option for getWindowBoundsCentered() and centerWindow() Apr 6, 2021
@sindresorhus sindresorhus merged commit 7edb57d into sindresorhus:main Apr 6, 2021
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.

Option to ignore MacOS dock and Windows taskbar height when using centerWindow()

2 participants