hacdias / electron-menubar

Easy way to create an electron menubar application.
MIT License
39 stars 1 forks source link

Odd Placement on macOS if menubar is set to hide #2

Open hacdias opened 6 years ago

hacdias commented 6 years ago

Ref.: https://github.com/ipfs-shipyard/ipfs-desktop/issues/586

olizilla commented 5 years ago

This module cleans up code from https://github.com/maxogden/menubar and https://github.com/pixtron/electron-traywindow-positioner

of note, menubar uses https://github.com/jenslind/electron-positioner rather than electron-traywindow-positioner, and that dep has been updated more recently, perhaps a fix for this issue can be found there.

hacdias commented 5 years ago

@olizilla I was digging into past PRs and it seems that I created this module because there were some bugs with the alignment on Linux (https://github.com/ipfs-shipyard/ipfs-desktop/pull/563).

For what I read, the Tray.getBounds() only works on Windows and macOS and jenslind/electron-positioner doesn't take that into account, hence not working on Linux as expected. That's why I ended up reusing the code from electron-traywindow-positioner. Although I will take a look at the first's code to see what they do. Maybe they don't have this issue