Fix macos Full Screen Toggle menu item label (#11633)
This commit is contained in:
parent
d0af17e601
commit
2b4cc0a525
2 changed files with 6 additions and 3 deletions
|
@ -732,7 +732,7 @@ enum {
|
||||||
[super performClose:sender];
|
[super performClose:sender];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)toggleFullScreen:(id)sender {
|
- (void)toggleFullScreenMode:(id)sender {
|
||||||
if (shell_->simple_fullscreen())
|
if (shell_->simple_fullscreen())
|
||||||
shell_->SetSimpleFullScreen(!shell_->IsSimpleFullScreen());
|
shell_->SetSimpleFullScreen(!shell_->IsSimpleFullScreen());
|
||||||
else
|
else
|
||||||
|
@ -1178,7 +1178,7 @@ void NativeWindowMac::SetFullScreen(bool fullscreen) {
|
||||||
if (fullscreen == IsFullscreen())
|
if (fullscreen == IsFullscreen())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
[window_ toggleFullScreen:nil];
|
[window_ toggleFullScreenMode:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsFullscreen() const {
|
bool NativeWindowMac::IsFullscreen() const {
|
||||||
|
|
|
@ -41,7 +41,10 @@ Role kRolesMap[] = {
|
||||||
{ @selector(performClose:), "close" },
|
{ @selector(performClose:), "close" },
|
||||||
{ @selector(performZoom:), "zoom" },
|
{ @selector(performZoom:), "zoom" },
|
||||||
{ @selector(terminate:), "quit" },
|
{ @selector(terminate:), "quit" },
|
||||||
{ @selector(toggleFullScreen:), "togglefullscreen" },
|
// ↓ is intentionally not `toggleFullScreen`. The macOS full screen menu item behaves weird.
|
||||||
|
// If we use `toggleFullScreen`, then the menu item will use the default label, and not take
|
||||||
|
// the one provided.
|
||||||
|
{ @selector(toggleFullScreenMode:), "togglefullscreen" },
|
||||||
{ @selector(toggleTabBar:), "toggletabbar" },
|
{ @selector(toggleTabBar:), "toggletabbar" },
|
||||||
{ @selector(selectNextTab:), "selectnexttab" },
|
{ @selector(selectNextTab:), "selectnexttab" },
|
||||||
{ @selector(selectPreviousTab:), "selectprevioustab" },
|
{ @selector(selectPreviousTab:), "selectprevioustab" },
|
||||||
|
|
Loading…
Reference in a new issue