Browse Source

fix: use `HasStyleMask(NSWindowStyleMaskResizable)` instead of `IsResizable()` for enabling/disabling window maximize button (#40994)

Tamás Zahola 1 year ago
parent
commit
f97d8719e6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      shell/browser/native_window_mac.mm

+ 2 - 1
shell/browser/native_window_mac.mm

@@ -916,7 +916,8 @@ bool NativeWindowMac::IsMaximizable() const {
 
 void NativeWindowMac::UpdateZoomButton() {
   [[window_ standardWindowButton:NSWindowZoomButton]
-      setEnabled:IsResizable() && (CanMaximize() || IsFullScreenable())];
+      setEnabled:HasStyleMask(NSWindowStyleMaskResizable) &&
+                 (CanMaximize() || IsFullScreenable())];
 }
 
 void NativeWindowMac::SetFullScreenable(bool fullscreenable) {