[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 2/3] ui/cocoa: Resize window after toggling zoom-to-fit
From: |
Akihiko Odaki |
Subject: |
[PATCH v2 2/3] ui/cocoa: Resize window after toggling zoom-to-fit |
Date: |
Sat, 23 Mar 2024 15:20:02 +0900 |
Resize the window so that the content will fit without zooming.
Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
ui/cocoa.m | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 834ebf5f6175..3a1b899ba768 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1396,6 +1396,7 @@ - (void)zoomToFit:(id) sender
[[cocoaView window] setStyleMask:styleMask];
[sender setState:styleMask & NSWindowStyleMaskResizable ?
NSControlStateValueOn : NSControlStateValueOff];
+ [cocoaView resizeWindow];
}
- (void)toggleZoomInterpolation:(id) sender
--
2.44.0