-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
core: respect visible
menuBarVisibility
for fullscreen
#11119
Conversation
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
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. |
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 tovisible
then the menu should remain visible on fullscreen for both thecustom
andnative
main-menus. The change also includes a listener to properly update the main-menu when in full-screen.How to test
toggling behavior:
window.titleBarStyle
tonative
window.menuBarVisibility
, confirm the behaviornative
classic
native
hidden
native
compact
native
visible
custom
classic
custom
hidden
custom
compact
custom
visible
The behavior of each option should be similar to what is experienced in vscode.
full-screen behavior:
custom
andnative
titlebar styles that:menuBarVisibility
will properly update the visibilityvisible
should display the menu in full-screenReview checklist
Reminder for reviewers
Signed-off-by: vince-fugnitto [email protected]