From 2ba97ae0dbd01a4f46c543ae025249e5349e0585 Mon Sep 17 00:00:00 2001 From: Sven Weidauer Date: Mon, 5 Jun 2017 11:20:56 +0200 Subject: Reformat code using clang-format. --- frontends/cocoa/ScrollableView.m | 56 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'frontends/cocoa/ScrollableView.m') diff --git a/frontends/cocoa/ScrollableView.m b/frontends/cocoa/ScrollableView.m index 8f27b2b56..e31d90ade 100644 --- a/frontends/cocoa/ScrollableView.m +++ b/frontends/cocoa/ScrollableView.m @@ -20,52 +20,52 @@ @interface ScrollableView () -- (void) frameChangeNotification: (NSNotification *) note; +- (void)frameChangeNotification:(NSNotification *)note; @end @implementation ScrollableView @synthesize minimumSize; -- (void) setMinimumSize: (NSSize)newSize +- (void)setMinimumSize:(NSSize)newSize { - minimumSize = newSize; - [self adjustFrame]; + minimumSize = newSize; + [self adjustFrame]; } -- (void) adjustFrame +- (void)adjustFrame { - NSSize frameSize = [[self superview] frame].size; - [self setFrameSize: NSMakeSize( MAX( minimumSize.width, frameSize.width ), - MAX( minimumSize.height, frameSize.height ) )]; + NSSize frameSize = [[self superview] frame].size; + [self setFrameSize:NSMakeSize(MAX(minimumSize.width, frameSize.width), + MAX(minimumSize.height, frameSize.height))]; } -- (void) frameChangeNotification: (NSNotification *) note +- (void)frameChangeNotification:(NSNotification *)note { - [self adjustFrame]; + [self adjustFrame]; } -- (void) viewDidMoveToSuperview +- (void)viewDidMoveToSuperview { - if (observedSuperview) { - [[NSNotificationCenter defaultCenter] - removeObserver: self - name: NSViewFrameDidChangeNotification - object: observedSuperview]; - observedSuperview = nil; - } + if (observedSuperview) { + [[NSNotificationCenter defaultCenter] + removeObserver:self + name:NSViewFrameDidChangeNotification + object:observedSuperview]; + observedSuperview = nil; + } - NSView *newSuperView = [self superview]; + NSView *newSuperView = [self superview]; - if (nil != newSuperView) { - observedSuperview = newSuperView; - [[NSNotificationCenter defaultCenter] - addObserver: self - selector: @selector(frameChangeNotification:) - name: NSViewFrameDidChangeNotification - object: observedSuperview]; - [observedSuperview setPostsFrameChangedNotifications: YES]; - } + if (nil != newSuperView) { + observedSuperview = newSuperView; + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(frameChangeNotification:) + name:NSViewFrameDidChangeNotification + object:observedSuperview]; + [observedSuperview setPostsFrameChangedNotifications:YES]; + } } @end -- cgit v1.2.3