From: Matthew Judy Date: Tue, 30 Sep 2003 06:26:16 +0000 (+0000) Subject: Checking in so Joe can work on view glitches. X-Git-Tag: v0.1~29 X-Git-Url: http://git.ithinksw.org/ITKit.git/commitdiff_plain/22ddc2ccf5a32acf25445656e9c14e22a62835c9 Checking in so Joe can work on view glitches. --- diff --git a/ITButtonCell.m b/ITButtonCell.m index 7885dc3..fa3c5bb 100755 --- a/ITButtonCell.m +++ b/ITButtonCell.m @@ -51,6 +51,7 @@ if ( _subStyle == ITGrayRoundedBezelStyle ) { [self drawGrayRoundedBezelWithFrame:rect inView:controlView]; [super drawInteriorWithFrame:rect inView:controlView]; + [[controlView superview] setNeedsDisplay:YES]; } else { [super drawWithFrame:rect inView:controlView]; } diff --git a/ITTSWBackgroundView.h b/ITTSWBackgroundView.h index 522af29..8d49143 100755 --- a/ITTSWBackgroundView.h +++ b/ITTSWBackgroundView.h @@ -15,7 +15,7 @@ @interface ITGrayRoundedView : NSView { - + NSBezierPath *_path; } @end diff --git a/ITTSWBackgroundView.m b/ITTSWBackgroundView.m index baa0cba..94731aa 100755 --- a/ITTSWBackgroundView.m +++ b/ITTSWBackgroundView.m @@ -3,31 +3,43 @@ @implementation ITGrayRoundedView +- (id)initWithFrame:(NSRect)frameRect +{ + if ( (self = [super initWithFrame:frameRect]) ) { + _path = [[NSBezierPath bezierPath] retain]; + } + + return self; +} + - (void)drawRect:(NSRect)theRect { - NSBezierPath *path = [NSBezierPath bezierPath]; float vh = NSHeight(theRect); float vw = NSWidth(theRect); - [path moveToPoint:NSMakePoint( 0.0, (vh - 24.0) )]; // first point - [path curveToPoint:NSMakePoint( 24.0, vh ) + + [_path autorelease]; + _path = [[NSBezierPath bezierPath] retain]; + + [_path moveToPoint:NSMakePoint( 0.0, (vh - 24.0) )]; // first point + [_path curveToPoint:NSMakePoint( 24.0, vh ) controlPoint1:NSMakePoint( 0.0, (vh - 11.0) ) controlPoint2:NSMakePoint( 11.0, vh )]; // top-left curve - [path lineToPoint:NSMakePoint( (vw - 24.0), vh )]; // top line - [path curveToPoint:NSMakePoint( vw, (vh - 24.0) ) + [_path lineToPoint:NSMakePoint( (vw - 24.0), vh )]; // top line + [_path curveToPoint:NSMakePoint( vw, (vh - 24.0) ) controlPoint1:NSMakePoint( (vw - 11.0), vh ) controlPoint2:NSMakePoint( vw, (vh - 11.0) )]; // top-right curve - [path lineToPoint:NSMakePoint( vw, 24.0 )]; // right line - [path curveToPoint:NSMakePoint( (vw - 24.0), 0.0 ) + [_path lineToPoint:NSMakePoint( vw, 24.0 )]; // right line + [_path curveToPoint:NSMakePoint( (vw - 24.0), 0.0 ) controlPoint1:NSMakePoint( vw, 11.0 ) controlPoint2:NSMakePoint( (vw - 11.0), 0.0 )]; // bottom-right curve - [path lineToPoint:NSMakePoint( 24.0, 0.0 )]; // bottom line - [path curveToPoint:NSMakePoint( 0.0, 24.0 ) + [_path lineToPoint:NSMakePoint( 24.0, 0.0 )]; // bottom line + [_path curveToPoint:NSMakePoint( 0.0, 24.0 ) controlPoint1:NSMakePoint( 11.0, 0.0 ) controlPoint2:NSMakePoint( 0.0, 11.0 )]; // bottom-left curve - [path closePath]; // left line + [_path closePath]; // left line [[NSColor colorWithCalibratedWhite:0.0 alpha:0.15] set]; - [path fill]; + [_path fill]; } - (BOOL)isOpaque diff --git a/ITTextFieldCell.m b/ITTextFieldCell.m index 3d04848..00d54f6 100755 --- a/ITTextFieldCell.m +++ b/ITTextFieldCell.m @@ -24,7 +24,7 @@ shadowAmbient = 0.15; shadowHeight = 1.00; shadowRadius = 4.00; - shadowSaturation = 1.0; + shadowSaturation = 1.2; } return self; diff --git a/ITTransientStatusWindow.h b/ITTransientStatusWindow.h index 9fbd1fc..021c8a7 100755 --- a/ITTransientStatusWindow.h +++ b/ITTransientStatusWindow.h @@ -61,7 +61,7 @@ typedef enum { NSTimer *_exitTimer; -// NSView *_contentSubView; + NSView *_contentSubView; } + (id)sharedWindow; diff --git a/Showcase/Controller.h b/Showcase/Controller.h index 0cc1118..82a1a6a 100755 --- a/Showcase/Controller.h +++ b/Showcase/Controller.h @@ -32,6 +32,7 @@ IBOutlet NSPopUpButton *swBackgroundTypePopup; IBOutlet NSPopUpButton *swDefinedPositionPopup; IBOutlet NSTextField *swVanishDelay; + IBOutlet NSTextField *swShadowSaturation; IBOutlet NSSlider *swSpeedSlider; } diff --git a/Showcase/Controller.m b/Showcase/Controller.m index b23d06f..5b655a6 100755 --- a/Showcase/Controller.m +++ b/Showcase/Controller.m @@ -30,7 +30,6 @@ [button setBezelStyle:1001]; [button setFont:[NSFont fontWithName:@"Lucida Grande Bold" size:14]]; [button setTitle:@"Launch Manually"]; - [button setButtonType:NSMomentaryLight]; [button sizeToFit]; [button setFrameSize:NSMakeSize([button frame].size.width + 8, 24)]; [testTextField setCastsShadow:YES]; @@ -186,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 ); @@ -219,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]; diff --git a/Showcase/English.lproj/MainMenu.nib/classes.nib b/Showcase/English.lproj/MainMenu.nib/classes.nib index 37fb827..adb8869 100755 --- a/Showcase/English.lproj/MainMenu.nib/classes.nib +++ b/Showcase/English.lproj/MainMenu.nib/classes.nib @@ -29,6 +29,7 @@ swBackgroundTypePopup = NSPopUpButton; swDefinedPositionPopup = NSPopUpButton; swSampleTextView = NSTextView; + swShadowSaturation = NSTextField; swSpeedSlider = NSSlider; swVanishDelay = NSTextField; swVanishModePopup = NSPopUpButton; @@ -43,6 +44,7 @@ {CLASS = ITBevelView; LANGUAGE = ObjC; SUPERCLASS = NSView; }, {CLASS = ITButton; LANGUAGE = ObjC; SUPERCLASS = NSButton; }, {CLASS = ITButtonCell; LANGUAGE = ObjC; SUPERCLASS = NSButtonCell; }, + {CLASS = ITGrayRoundedView; LANGUAGE = ObjC; SUPERCLASS = NSView; }, {CLASS = ITLED; LANGUAGE = ObjC; SUPERCLASS = NSControl; }, {CLASS = ITLEDCell; LANGUAGE = ObjC; SUPERCLASS = NSActionCell; }, {CLASS = ITTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; }, diff --git a/Showcase/English.lproj/MainMenu.nib/info.nib b/Showcase/English.lproj/MainMenu.nib/info.nib index e3e4173..5e6fd3c 100755 --- a/Showcase/English.lproj/MainMenu.nib/info.nib +++ b/Showcase/English.lproj/MainMenu.nib/info.nib @@ -3,7 +3,7 @@ IBDocumentLocation - 10 19 496 240 0 0 1056 770 + 546 7 496 240 0 0 1056 770 IBEditorPositions 197 diff --git a/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib b/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib index 944ea80..5ad95ee 100755 Binary files a/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib and b/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib differ