macOS remove FullScreen support (#3220)

removed fullscreen support, as it opens a can of worms trying to fully support it....

https://github.com/transmission/transmission/issues/3215#issuecomment-1147477253
This commit is contained in:
SweetPPro
2022-06-08 21:15:51 +02:00
committed by GitHub
parent 12592e20d6
commit aabb8c809e
7 changed files with 17 additions and 28 deletions

View File

@@ -563,6 +563,9 @@ static void removeKeRangerRansomware()
self.fWindow.delegate = self; //do manually to avoid placement issue
//disable fullscreen support
[self.fWindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone];
[self.fWindow makeFirstResponder:self.fTableView];
self.fWindow.excludedFromWindowsMenu = YES;
@@ -3960,7 +3963,7 @@ static void removeKeRangerRansomware()
NSUInteger const scrollMask = scrollView.autoresizingMask;
scrollView.autoresizingMask = NSViewNotSizable;
NSRect frame = [self windowFrameByAddingHeight:heightChange checkLimits:NO];
NSRect const frame = [self windowFrameByAddingHeight:heightChange checkLimits:NO];
[self.fWindow setFrame:frame display:YES animate:animate];
//re-enable autoresize
@@ -5168,28 +5171,9 @@ 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"] && self.fWindow.isFullScreen == NO)
if ([self.fDefaults boolForKey:@"AutoSize"])
{
NSScrollView* scrollView = self.fTableView.enclosingScrollView;