X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/e873f11d0bb398c460817aa1dd4061572f5a1d09..bd40b798b6a46cfecdfb128e2992bba254148911:/Showcase/Controller.m diff --git a/Showcase/Controller.m b/Showcase/Controller.m index 80fc5f1..5b655a6 100755 --- a/Showcase/Controller.m +++ b/Showcase/Controller.m @@ -1,6 +1,7 @@ #import "Controller.h" #import "ITTransientStatusWindow.h" #import "ITTextField.h" +#import "ITBevelView.h" #import "ITCutWindowEffect.h" #import "ITDissolveWindowEffect.h" #import "ITSlideHorizontallyWindowEffect.h" @@ -26,8 +27,14 @@ - (void)awakeFromNib { [self createStatusItem]; + [button setBezelStyle:1001]; + [button setFont:[NSFont fontWithName:@"Lucida Grande Bold" size:14]]; + [button setTitle:@"Launch Manually"]; + [button sizeToFit]; + [button setFrameSize:NSMakeSize([button frame].size.width + 8, 24)]; [testTextField setCastsShadow:YES]; [tabView setAllowsDragging:YES]; + [bevelView setBevelDepth:10]; statusWindow = [ITTransientStatusWindow sharedWindow]; [statusWindow setEntryEffect:[[ITCutWindowEffect alloc] initWithWindow:statusWindow]]; [statusWindow setExitEffect:[[ITDissolveWindowEffect alloc] initWithWindow:statusWindow]]; @@ -60,6 +67,10 @@ } [statusItem setMenu:statusItemMenu]; + + [statusItemMenu addItemWithTitle:[NSString stringWithUTF8String:"★★★★★"] + action:nil + keyEquivalent:@""]; } - (void)removeStatusItem @@ -174,7 +185,7 @@ // Add 4.0 to the final textHeight to accomodate the shadow. textHeight += 4.0; - + NSLog(@"%f", textHeight); // Set the content height to the greater of the text and image heights. contentHeight = ( ( imageHeight > textHeight ) ? imageHeight : textHeight ); @@ -207,6 +218,7 @@ [textField setTextColor:[NSColor whiteColor]]; [textField setCastsShadow:YES]; [textField setStringValue:text]; + [textField setShadowSaturation:[swShadowSaturation floatValue]]; [[statusWindow contentView] addSubview:textField]; [[statusWindow contentView] setNeedsDisplay:YES]; @@ -316,6 +328,23 @@ } +/*************************************************************************/ +#pragma mark - +#pragma mark ITBevelView SUPPORT +/*************************************************************************/ + +- (IBAction)changeBevelViewSetting:(id)sender +{ + [bevelView setBevelDepth:[sender intValue]]; +} + + +/*************************************************************************/ +#pragma mark - +#pragma mark ITButton SUPPORT +/*************************************************************************/ + + /*************************************************************************/ #pragma mark - #pragma mark NSWindow DELEGATE METHODS