Anonymous avatar Anonymous committed 1e85d62

Split view - Updated inspector to use bwAnimator category method

Comments (0)

Files changed (1)


 #import "BWSplitViewInspector.h"
 #import "NSView+BWAdditions.h"
+#import "NSEvent+BWAdditions.h"
 @interface BWSplitViewInspector (BWSVIPrivate)
 - (void)updateSizeInputFields;
-- (void)setDividerCheckboxWantsLayer:(NSString *)flag
-	if ([flag isEqualToString:@"YES"])
-		[dividerCheckbox setWantsLayer:YES];
-	else
-		[dividerCheckbox setWantsLayer:NO];
 - (BOOL)toggleDividerCheckboxVisibilityWithAnimation:(BOOL)shouldAnimate
 	// Conditions that must be met for a visibility switch to take place. If any of them fail, we return early.
 		return NO;
-	float duration = 0.1, alpha;
+	float alpha, duration = [NSEvent bwShiftKeyIsDown] ? 0.1 * 10 : 0.1;
 	NSRect targetFrame = NSZeroRect;
 	if (dividerCheckboxCollapsed)
 		alpha = 0.0;
-	[self performSelector:@selector(setDividerCheckboxWantsLayer:) withObject:@"YES" afterDelay:0];
 	if (shouldAnimate)
 		[NSAnimationContext beginGrouping];
 		[[NSAnimationContext currentContext] setDuration:duration];
-		[[dividerCheckbox animator] setAlphaValue:alpha];
-		[[[self view] animator] setFrame:targetFrame];
+		[[dividerCheckbox bwAnimator] setAlphaValue:alpha];
+		[[[self view] bwAnimator] setFrame:targetFrame];
 		[NSAnimationContext endGrouping];
-		if (dividerCheckboxCollapsed)
-			[self performSelector:@selector(setDividerCheckboxWantsLayer:) withObject:@"NO" afterDelay:duration];
 		[dividerCheckbox setAlphaValue:alpha];
 		[[self view] setFrame:targetFrame];
-		if (dividerCheckboxCollapsed)
-			[self performSelector:@selector(setDividerCheckboxWantsLayer:) withObject:@"NO" afterDelay:0];
 	dividerCheckboxCollapsed = !dividerCheckboxCollapsed;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.