nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

Window is not centered vertically when "center" position is requested

Open arudnev opened this issue 4 years ago • 1 comments

NWJS Version : 0.44.3 Operating System : macOS Catalina (10.15.3)

Expected behavior

Window should be centered vertically

Actual behavior

Window is centered around 1/3 of screen height, closer to the top

How to reproduce

rm -rf "${HOME}/Library/Application Support/nwjs-test" && \
cd /tmp && rm -rf nwjs-test && mkdir nwjs-test && cd nwjs-test && \
echo '{"name": "nwjs-test", "main": "data:,test", "window": {"id": "test", "title": "position test", "position": "center", "width": 200, "height": 200}}' > package.json && \
~/Downloads/nwjs-sdk-v0.44.3-osx-x64/nwjs.app/Contents/MacOS/nwjs .

or simply executing the following in dev tools console

nw.Window.open('data:,test', {id: 'dialog', position: 'center', width:200, height: 200})

arudnev avatar Feb 28 '20 16:02 arudnev

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 09 '22 10:01 stale[bot]