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

This commit is contained in:
Tamás Zahola 2024-01-17 18:23:41 +01:00 committed by GitHub
parent 021592200e
commit f97d8719e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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