Auto-hide menubar when in fullscreen

This commit is contained in:
Cheng Zhao 2016-07-11 13:10:19 +09:00
parent 32f3f3244e
commit a1a870fe43

View file

@ -504,6 +504,12 @@ void NativeWindowViews::SetFullScreen(bool fullscreen) {
else
window_->native_widget_private()->ShowWithWindowState(
ui::SHOW_STATE_FULLSCREEN);
// Auto-hide menubar when in fullscreen.
if (fullscreen)
SetMenuBarVisibility(false);
else
SetMenuBarVisibility(!menu_bar_autohide_);
#endif
}