Browse Source

Merge pull request #8255 from AvaloniaUI/fixes/osx-extended-wants-chrome-hint

OSX: fix logic for deciding if chrome buttons should be shown or not in ex…
pull/8258/head
Dan Walmsley 4 years ago
committed by GitHub
parent
commit
fccf8ec9cd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      native/Avalonia.Native/src/OSX/WindowImpl.mm

2
native/Avalonia.Native/src/OSX/WindowImpl.mm

@ -32,7 +32,7 @@ void WindowImpl::HideOrShowTrafficLights() {
} }
bool wantsChrome = (_extendClientHints & AvnSystemChrome) || (_extendClientHints & AvnPreferSystemChrome); bool wantsChrome = (_extendClientHints & AvnSystemChrome) || (_extendClientHints & AvnPreferSystemChrome);
bool hasTrafficLights = _isClientAreaExtended ? !wantsChrome : _decorations != SystemDecorationsFull; bool hasTrafficLights = _isClientAreaExtended ? wantsChrome : _decorations != SystemDecorationsFull;
[[Window standardWindowButton:NSWindowCloseButton] setHidden:hasTrafficLights]; [[Window standardWindowButton:NSWindowCloseButton] setHidden:hasTrafficLights];
[[Window standardWindowButton:NSWindowMiniaturizeButton] setHidden:hasTrafficLights]; [[Window standardWindowButton:NSWindowMiniaturizeButton] setHidden:hasTrafficLights];

Loading…
Cancel
Save