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

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"])