diff --git a/Source/NSBox.m b/Source/NSBox.m index 7a7fe04f5..f3cf9123f 100644 --- a/Source/NSBox.m +++ b/Source/NSBox.m @@ -242,7 +242,9 @@ NSRect f; if ([_content_view respondsToSelector: @selector(sizeToFit)]) - [_content_view sizeToFit]; + { + [_content_view sizeToFit]; + } else // _content_view !respondsToSelector: sizeToFit { NSArray *subviewArray = [_content_view subviews]; @@ -642,9 +644,13 @@ if (!aFlag) { if (r.size.width < 0) - r.size.width = 0; + { + r.size.width = 0; + } if (r.size.height < 0) - r.size.height = 0; + { + r.size.height = 0; + } } return r; diff --git a/Source/NSButton.m b/Source/NSButton.m index a9c016130..92d9acebc 100644 --- a/Source/NSButton.m +++ b/Source/NSButton.m @@ -172,29 +172,29 @@ id _nsbuttonCellClass = nil; return [_cell title]; } -- (NSAttributedString *)attributedAlternateTitle +- (NSAttributedString *) attributedAlternateTitle { return [_cell attributedAlternateTitle]; } -- (NSAttributedString *)attributedTitle +- (NSAttributedString *) attributedTitle { return [_cell attributedTitle]; } -- (void)setAttributedAlternateTitle:(NSAttributedString *)aString +- (void) setAttributedAlternateTitle: (NSAttributedString *)aString { [_cell setAttributedAlternateTitle: aString]; [self setNeedsDisplay: YES]; } -- (void)setAttributedTitle:(NSAttributedString *)aString +- (void) setAttributedTitle: (NSAttributedString *)aString { [_cell setAttributedTitle: aString]; [self setNeedsDisplay: YES]; } -- (void)setTitleWithMnemonic:(NSString *)aString +- (void) setTitleWithMnemonic: (NSString *)aString { [_cell setTitleWithMnemonic: aString]; [self setNeedsDisplay: YES]; @@ -378,12 +378,12 @@ id _nsbuttonCellClass = nil; return NO; } -- (void)setSound:(NSSound *)aSound +- (void) setSound: (NSSound *)aSound { [_cell setSound: aSound]; } -- (NSSound *)sound +- (NSSound *) sound { return [_cell sound]; } @@ -391,16 +391,15 @@ id _nsbuttonCellClass = nil; // // NSCoding protocol // -- (void) encodeWithCoder: (NSCoder*)aCoder +- (void) encodeWithCoder: (NSCoder *)aCoder { [super encodeWithCoder: aCoder]; } -- (id) initWithCoder: (NSCoder*)aDecoder +- (id) initWithCoder: (NSCoder *)aDecoder { [super initWithCoder: aDecoder]; return self; } - @end