From 454adfb9d1eb259b9264ea1c8215c6c22d7bd283 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Sun, 14 Aug 2011 01:57:09 +0200 Subject: [PATCH] Reorganize and fix typography --- Medianno/MADocWindow.mm | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Medianno/MADocWindow.mm b/Medianno/MADocWindow.mm index 15124eb..9bf21b3 100644 --- a/Medianno/MADocWindow.mm +++ b/Medianno/MADocWindow.mm @@ -97,6 +97,21 @@ withEvent:nil select:YES]; } +- (void)delete:(id)sender +{ + NSResponder * responder = [[self window] firstResponder]; + while (responder && responder != self) { + if (responder == mediaTable) { + [mediaController remove:sender]; + break; + } else if (responder == annotationTable) { + [annotationController remove:sender]; + break; + } + responder = [responder nextResponder]; + } +} + - (IBAction)toggleMediaPlay:(id)sender { if ([[movieView movie] rate] > 0.0f) @@ -171,38 +186,23 @@ static NSTimeInterval sLastSkip = 0.0; return [[self document] tagDescriptionForName:editingString]; } -#pragma mark Menu commands - -- (IBAction)delete:(id)sender -{ - NSResponder * responder = [[self window] firstResponder]; - while (responder && responder != self) { - if (responder == mediaTable) { - [mediaController remove:sender]; - break; - } else if (responder == annotationTable) { - [annotationController remove:sender]; - break; - } - responder = [responder nextResponder]; - } -} - #pragma mark Split management --(CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)dividerIndex +- (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)dividerIndex { return splitView.frame.size.height-108.0; } - --(CGFloat)splitView:(NSSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)dividerIndex + +- (CGFloat)splitView:(NSSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)dividerIndex { return 80.0; } -// This only prevents resizing the topView in cases where the user does not use the divider (resizing the window primarily). --(BOOL)splitView:(NSSplitView *)splitView shouldAdjustSizeOfSubview:(NSView *)subview +- (BOOL)splitView:(NSSplitView *)splitView shouldAdjustSizeOfSubview:(NSView *)subview { + // + // Only resize the bottom view if window is resized or zoomed + // return subview != [[splitView subviews] objectAtIndex:0]; }