summaryrefslogtreecommitdiff
path: root/frontends/cocoa/ScrollableView.m
diff options
context:
space:
mode:
authorSven Weidauer <sven@5sw.de>2017-06-05 11:20:56 +0200
committerSven Weidauer <sven@5sw.de>2017-06-05 11:20:56 +0200
commit2ba97ae0dbd01a4f46c543ae025249e5349e0585 (patch)
tree5028ee570078f80f98049bd5a68b209ecfdaca59 /frontends/cocoa/ScrollableView.m
parent3ee40a10b123c36be3e29602767840a7a71aaafa (diff)
downloadnetsurf-2ba97ae0dbd01a4f46c543ae025249e5349e0585.tar.gz
netsurf-2ba97ae0dbd01a4f46c543ae025249e5349e0585.tar.bz2
Reformat code using clang-format.
Diffstat (limited to 'frontends/cocoa/ScrollableView.m')
-rw-r--r--frontends/cocoa/ScrollableView.m56
1 files changed, 28 insertions, 28 deletions
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