sindrets / atom-title-bar-replacer

Adds an alternative, theme-aware title bar and application menu that is more inline with Atom's UI design.
Other
85 stars 5 forks source link

Allowing menu drop-down from OS #7

Open silverkorn opened 7 years ago

silverkorn commented 7 years ago

Due to the limitation of this feature to stay within the current window, would it be possible to use the OS menu drop-down list to allow getting outside of if? (Adobe Suite seems to use this kind of behaviour)

Making it as a custom option in the settings would be great!

Thanks!

sindrets commented 7 years ago

@silverkorn Electron doesn't allow frameless windows to use the native menu bar. Or more specifically: the menu bar is part of the window frame. I did realise this could pose a problem a while ago, and while attempting to fix it I found out that it wasn't as easy as I first had anticipated: apparently, for some odd reason, CSS doesn't allow

overflow-y: scroll;
overflow-x: visible;

Css automatically reads this as if they were both "scroll". This results in all the menus being encapsulated with a horizontal scrollbar, where you have to scroll right to be able to see nested menus. Setting overflow-x: hidden; makes nested menus completely invisible.

The only solution, I think, is to create a new window through electron. That way menus can be displayed outside of Atom's window. I'll look into that.

silverkorn commented 7 years ago

Or, at a minimum, create up/down arrows to allows scrolling the menu. This would allow to stay within the same window?

path4546-6

sindrets commented 7 years ago

@silverkorn That is a great workaround. Thanks for the illustrative graphics. I'll see what I end up doing, but this might just be it.