mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
Update Controller.mm (#3191)
fix fullscreen behaviour as described here https://github.com/transmission/transmission/issues/1906
This commit is contained in:
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user