1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-22 06:00:41 +00:00

Update Controller.mm (#3191)

fix fullscreen behaviour as described here https://github.com/transmission/transmission/issues/1906
This commit is contained in:
SweetPPro 2022-06-04 21:30:03 +02:00 committed by GitHub
parent 2ff4041074
commit d31254df50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5167,6 +5167,25 @@ static void removeKeRangerRansomware()
return frame;
}
- (void)windowWillEnterFullScreen:(NSNotification*)notification
{
// temporarily disable AutoSize
NSSize contentMinSize = self.fWindow.contentMinSize;
contentMinSize.height = self.minWindowContentSizeAllowed;
self.fWindow.contentMinSize = contentMinSize;
NSSize contentMaxSize = self.fWindow.contentMaxSize;
contentMaxSize.height = FLT_MAX;
self.fWindow.contentMaxSize = contentMaxSize;
}
- (void)windowDidExitFullScreen:(NSNotification*)notification
{
// restore auotsize setting
[self updateForAutoSize];
}
- (void)setWindowSizeToFit
{
if ([self.fDefaults boolForKey:@"AutoSize"])