diff --git a/AppKit/CPButton.j b/AppKit/CPButton.j index 25f1424ff..510c106ac 100644 --- a/AppKit/CPButton.j +++ b/AppKit/CPButton.j @@ -448,38 +448,47 @@ CPButtonImageOffset = 3.0; { switch (aButtonType) { - case CPMomentaryLightButton: [self setHighlightsBy:CPChangeGrayCellMask | CPChangeBackgroundCellMask]; - [self setShowsStateBy:CPNoCellMask]; - break; + case CPMomentaryLightButton: + [self setHighlightsBy:CPChangeGrayCellMask | CPChangeBackgroundCellMask]; + [self setShowsStateBy:CPNoCellMask]; + break; - case CPMomentaryPushInButton: [self setHighlightsBy:CPPushInCellMask | CPChangeGrayCellMask | CPChangeBackgroundCellMask]; - [self setShowsStateBy:CPNoCellMask]; - break; + case CPMomentaryPushInButton: + [self setHighlightsBy:CPPushInCellMask | CPChangeGrayCellMask | CPChangeBackgroundCellMask]; + [self setShowsStateBy:CPNoCellMask]; + break; - case CPMomentaryChangeButton: [self setHighlightsBy:CPContentsCellMask]; - [self setShowsStateBy:CPNoCellMask]; - break; + case CPMomentaryChangeButton: + [self setHighlightsBy:CPContentsCellMask]; + [self setShowsStateBy:CPNoCellMask]; + break; - case CPPushOnPushOffButton: [self setHighlightsBy:CPPushInCellMask | CPChangeGrayCellMask | CPChangeBackgroundCellMask]; - [self setShowsStateBy:CPChangeBackgroundCellMask | CPChangeGrayCellMask]; - break; + case CPPushOnPushOffButton: + [self setHighlightsBy:CPPushInCellMask | CPChangeGrayCellMask | CPChangeBackgroundCellMask]; + [self setShowsStateBy:CPChangeBackgroundCellMask | CPChangeGrayCellMask]; + break; - case CPOnOffButton: [self setHighlightsBy:CPChangeGrayCellMask | CPChangeBackgroundCellMask]; - [self setShowsStateBy:CPChangeGrayCellMask | CPChangeBackgroundCellMask]; - break; + case CPOnOffButton: + [self setHighlightsBy:CPChangeGrayCellMask | CPChangeBackgroundCellMask]; + [self setShowsStateBy:CPChangeGrayCellMask | CPChangeBackgroundCellMask]; + break; - case CPToggleButton: [self setHighlightsBy:CPPushInCellMask | CPContentsCellMask]; - [self setShowsStateBy:CPContentsCellMask]; - break; + case CPToggleButton: + [self setHighlightsBy:CPPushInCellMask | CPContentsCellMask]; + [self setShowsStateBy:CPContentsCellMask]; + break; - case CPSwitchButton: [CPException raise:CPInvalidArgumentException - reason:"The CPSwitchButton type is not supported in Cappuccino, use the CPCheckBox class instead."]; + case CPSwitchButton: + [CPException raise:CPInvalidArgumentException + reason:"The CPSwitchButton type is not supported in Cappuccino, use the CPCheckBox class instead."]; - case CPRadioButton: [CPException raise:CPInvalidArgumentException - reason:"The CPRadioButton type is not supported in Cappuccino, use the CPRadio class instead."]; + case CPRadioButton: + [CPException raise:CPInvalidArgumentException + reason:"The CPRadioButton type is not supported in Cappuccino, use the CPRadio class instead."]; - default: [CPException raise:CPInvalidArgumentException - reason:"Unknown button type."]; + default: + [CPException raise:CPInvalidArgumentException + reason:"Unknown button type."]; } [self setImageDimsWhenDisabled:YES]; diff --git a/AppKit/_CPToolbarItem.j b/AppKit/_CPToolbarItem.j index f3f4d1819..5d5600b47 100644 --- a/AppKit/_CPToolbarItem.j +++ b/AppKit/_CPToolbarItem.j @@ -642,22 +642,29 @@ var CPToolbarItemItemIdentifierKey = @"CPToolbarItemItemIdentifierKey", { switch (anItemIdentifier) { - case CPToolbarSeparatorItemIdentifier: return [_CPToolbarSeparatorItem new]; - case CPToolbarSpaceItemIdentifier: return [_CPToolbarSpaceItem new]; - case CPToolbarFlexibleSpaceItemIdentifier: return [_CPToolbarFlexibleSpaceItem new]; - case CPToolbarShowColorsItemIdentifier: return [_CPToolbarShowColorsItem new]; - case CPToolbarShowFontsItemIdentifier: return nil; - case CPToolbarCustomizeToolbarItemIdentifier: return nil; - case CPToolbarPrintItemIdentifier: return nil; + case CPToolbarSeparatorItemIdentifier: + return [_CPToolbarSeparatorItem new]; + + case CPToolbarSpaceItemIdentifier: + return [_CPToolbarSpaceItem new]; + + case CPToolbarFlexibleSpaceItemIdentifier: + return [_CPToolbarFlexibleSpaceItem new]; + + case CPToolbarShowColorsItemIdentifier: + return [_CPToolbarShowColorsItem new]; + + case CPToolbarShowFontsItemIdentifier: + return nil; + + case CPToolbarCustomizeToolbarItemIdentifier: + return nil; + + case CPToolbarPrintItemIdentifier: + return nil; } return nil; } @end - -/*@import "_CPToolbarFlexibleSpaceItem.j" -@import "_CPToolbarShowColorsItem.j" -@import "_CPToolbarSeparatorItem.j" -@import "_CPToolbarSpaceItem.j" -*/