Checking in so Joe can work on view glitches.
authorMatthew Judy <mjudy@ithinksw.com>
Tue, 30 Sep 2003 06:26:16 +0000 (06:26 +0000)
committerMatthew Judy <mjudy@ithinksw.com>
Tue, 30 Sep 2003 06:26:16 +0000 (06:26 +0000)
ITButtonCell.m
ITTSWBackgroundView.h
ITTSWBackgroundView.m
ITTextFieldCell.m
ITTransientStatusWindow.h
Showcase/Controller.h
Showcase/Controller.m
Showcase/English.lproj/MainMenu.nib/classes.nib
Showcase/English.lproj/MainMenu.nib/info.nib
Showcase/English.lproj/MainMenu.nib/keyedobjects.nib

index 7885dc3..fa3c5bb 100755 (executable)
@@ -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];
     }
index 522af29..8d49143 100755 (executable)
@@ -15,7 +15,7 @@
 
 
 @interface ITGrayRoundedView : NSView {
-
+    NSBezierPath *_path;
 }
 
 @end
index baa0cba..94731aa 100755 (executable)
@@ -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
index 3d04848..00d54f6 100755 (executable)
@@ -24,7 +24,7 @@
         shadowAmbient    = 0.15;
         shadowHeight     = 1.00;
         shadowRadius     = 4.00;
-        shadowSaturation = 1.0;
+        shadowSaturation = 1.2;
     }
 
     return self;
index 9fbd1fc..021c8a7 100755 (executable)
@@ -61,7 +61,7 @@ typedef enum {
     
     NSTimer *_exitTimer;
 
-//  NSView *_contentSubView;           
+    NSView *_contentSubView;           
 }
 
 + (id)sharedWindow;
index 0cc1118..82a1a6a 100755 (executable)
@@ -32,6 +32,7 @@
     IBOutlet NSPopUpButton  *swBackgroundTypePopup;
     IBOutlet NSPopUpButton  *swDefinedPositionPopup;
     IBOutlet NSTextField    *swVanishDelay;
+    IBOutlet NSTextField    *swShadowSaturation;
     IBOutlet NSSlider       *swSpeedSlider;
 }
 
index b23d06f..5b655a6 100755 (executable)
@@ -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];
     
     // 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 );
     
     [textField setTextColor:[NSColor whiteColor]];
     [textField setCastsShadow:YES];
     [textField setStringValue:text];
+    [textField setShadowSaturation:[swShadowSaturation floatValue]];
     [[statusWindow contentView] addSubview:textField];
 
     [[statusWindow contentView] setNeedsDisplay:YES];
index 37fb827..adb8869 100755 (executable)
@@ -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; }, 
index e3e4173..5e6fd3c 100755 (executable)
@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>10 19 496 240 0 0 1056 770 </string>
+       <string>546 7 496 240 0 0 1056 770 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>197</key>
index 944ea80..5ad95ee 100755 (executable)
Binary files a/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib and b/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib differ