mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
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:
@@ -74,6 +74,9 @@
|
|||||||
self.fNameField.stringValue = name;
|
self.fNameField.stringValue = name;
|
||||||
self.fNameField.toolTip = name;
|
self.fNameField.toolTip = name;
|
||||||
|
|
||||||
|
//disable fullscreen support
|
||||||
|
[self.window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone];
|
||||||
|
|
||||||
[self setGroupsMenu];
|
[self setGroupsMenu];
|
||||||
[self.fGroupPopUp selectItemWithTag:self.fGroupValue];
|
[self.fGroupPopUp selectItemWithTag:self.fGroupValue];
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,9 @@
|
|||||||
self.fNameField.stringValue = name;
|
self.fNameField.stringValue = name;
|
||||||
self.fNameField.toolTip = name;
|
self.fNameField.toolTip = name;
|
||||||
|
|
||||||
|
//disable fullscreen support
|
||||||
|
[self.window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone];
|
||||||
|
|
||||||
self.fIconView.image = self.torrent.icon;
|
self.fIconView.image = self.torrent.icon;
|
||||||
|
|
||||||
if (!self.torrent.folder)
|
if (!self.torrent.folder)
|
||||||
|
|||||||
@@ -563,6 +563,9 @@ static void removeKeRangerRansomware()
|
|||||||
|
|
||||||
self.fWindow.delegate = self; //do manually to avoid placement issue
|
self.fWindow.delegate = self; //do manually to avoid placement issue
|
||||||
|
|
||||||
|
//disable fullscreen support
|
||||||
|
[self.fWindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone];
|
||||||
|
|
||||||
[self.fWindow makeFirstResponder:self.fTableView];
|
[self.fWindow makeFirstResponder:self.fTableView];
|
||||||
self.fWindow.excludedFromWindowsMenu = YES;
|
self.fWindow.excludedFromWindowsMenu = YES;
|
||||||
|
|
||||||
@@ -3960,7 +3963,7 @@ static void removeKeRangerRansomware()
|
|||||||
NSUInteger const scrollMask = scrollView.autoresizingMask;
|
NSUInteger const scrollMask = scrollView.autoresizingMask;
|
||||||
scrollView.autoresizingMask = NSViewNotSizable;
|
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];
|
[self.fWindow setFrame:frame display:YES animate:animate];
|
||||||
|
|
||||||
//re-enable autoresize
|
//re-enable autoresize
|
||||||
@@ -5168,28 +5171,9 @@ static void removeKeRangerRansomware()
|
|||||||
return frame;
|
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
|
- (void)setWindowSizeToFit
|
||||||
{
|
{
|
||||||
if ([self.fDefaults boolForKey:@"AutoSize"] && self.fWindow.isFullScreen == NO)
|
if ([self.fDefaults boolForKey:@"AutoSize"])
|
||||||
{
|
{
|
||||||
NSScrollView* scrollView = self.fTableView.enclosingScrollView;
|
NSScrollView* scrollView = self.fTableView.enclosingScrollView;
|
||||||
|
|
||||||
|
|||||||
@@ -161,6 +161,9 @@ NSMutableSet* creatorWindowControllerSet = nil;
|
|||||||
|
|
||||||
self.window.title = name;
|
self.window.title = name;
|
||||||
|
|
||||||
|
//disable fullscreen support
|
||||||
|
[self.window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone];
|
||||||
|
|
||||||
self.fNameField.stringValue = name;
|
self.fNameField.stringValue = name;
|
||||||
self.fNameField.toolTip = self.fPath.path;
|
self.fNameField.toolTip = self.fPath.path;
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,4 @@
|
|||||||
|
|
||||||
@interface MainWindow : NSWindow
|
@interface MainWindow : NSWindow
|
||||||
|
|
||||||
- (BOOL)isFullScreen;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -29,9 +29,4 @@
|
|||||||
[super toggleToolbarShown:sender];
|
[super toggleToolbarShown:sender];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isFullScreen
|
|
||||||
{
|
|
||||||
return (self.styleMask & NSFullScreenWindowMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -58,6 +58,9 @@
|
|||||||
[window setFrameUsingName:@"MessageWindowFrame"];
|
[window setFrameUsingName:@"MessageWindowFrame"];
|
||||||
window.restorationClass = [self class];
|
window.restorationClass = [self class];
|
||||||
|
|
||||||
|
//disable fullscreen support
|
||||||
|
[window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone];
|
||||||
|
|
||||||
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(resizeColumn)
|
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(resizeColumn)
|
||||||
name:NSTableViewColumnDidResizeNotification
|
name:NSTableViewColumnDidResizeNotification
|
||||||
object:self.fMessageTable];
|
object:self.fMessageTable];
|
||||||
|
|||||||
Reference in New Issue
Block a user