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:
parent
2ff4041074
commit
d31254df50
1 changed files with 19 additions and 0 deletions
|
@ -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"])
|
||||
|
|
Loading…
Reference in a new issue