-
Notifications
You must be signed in to change notification settings - Fork 2.8k
core: respect visible menuBarVisibility for fullscreen
#11119
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
Conversation
colin-grant-work
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the combination of custom title bar and classic menu bar visibility give an unexpected result.
| Preference | Expectation | Behavior |
|---|---|---|
window.titleBarStyle = native && window.menuBarVisibility = classic |
toggling full-screen (F11) should hide the main menu | Hidden |
window.titleBarStyle = native && window.menuBarVisibility = hidden |
toggling full-screen (F11) should hide the main menu | Hidden |
window.titleBarStyle = native && window.menuBarVisibility = compact |
toggling full-screen (F11) should hide the main menu | Compact |
window.titleBarStyle = native && window.menuBarVisibility = visible |
toggling full-screen (F11) should show the main menu | Visible |
window.titleBarStyle = custom && window.menuBarVisibility = classic |
toggling full-screen (F11) should hide the main menu | Visible ❌ |
window.titleBarStyle = custom && window.menuBarVisibility = hidden |
toggling full-screen (F11) should hide the main menu | Hidden |
window.titleBarStyle = custom && window.menuBarVisibility = compact |
toggling full-screen (F11) should hide the main menu | Compact |
window.titleBarStyle = custom && window.menuBarVisibility = visible |
toggling full-screen (F11) should show the main menu | Visible |
07e4664 to
1ce2463
Compare
|
@colin-grant-work I've updated the pull-request so that it properly handles both |
The commit updates the handling of `toggle full screen` to respect `menuBarVisibility` properly. If the `menuBarVisibility` is set to `visible` the menu should be visible when the app is in fullscreen. Signed-off-by: vince-fugnitto <[email protected]>
1ce2463 to
a4c8f2e
Compare
colin-grant-work
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All 16 combinations of fullscreen, title bar style, and menu bar visibility now behave as expected 👍
|
@msujew I just wanted to know if you had any feedback given you touched the menus in the past :) |
|
I'll try to merge tomorrow if there are no objections. |
msujew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look reasonable to me!
What it does
Fixes #10077.
Closes #10213.
The pull-request updates the handling of "toggle full screen" (electron) to properly respect the preference
window.menuBarVisibility. If the preference is set tovisiblethen the menu should remain visible on fullscreen for both thecustomandnativemain-menus. The change also includes a listener to properly update the main-menu when in full-screen.How to test
toggling behavior:
window.titleBarStyletonativewindow.menuBarVisibility, confirm the behaviornativeclassicnativehiddennativecompactnativevisiblecustomclassiccustomhiddencustomcompactcustomvisibleThe behavior of each option should be similar to what is experienced in vscode.
full-screen behavior:
customandnativetitlebar styles that:menuBarVisibilitywill properly update the visibilityvisibleshould display the menu in full-screenReview checklist
Reminder for reviewers
Signed-off-by: vince-fugnitto [email protected]