Show
Ignore:
Timestamp:
10/24/07 01:33:07 (1 year ago)
Author:
morris
Message:

Touch up a bit

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Footagehead/trunk/FHInspectorController.m

    r4968 r4992  
    3939- (void)_setValue:(NSString *)value forKey:(NSString *)key; 
    4040- (void)_relayoutFields; 
    41 - (NSTextField *)_textFieldFromArchetype:(NSTextField *)archetypeTextField
     41- (NSTextField *)_textFieldLikeTextField:(NSTextField *)archetypeTextField withStringValue:(NSString *)string
    4242 
    4343@end 
     
    135135        CGFloat                 verticalOffset, height; 
    136136         
    137         verticalOffset = 18.0; 
     137        verticalOffset = 20.0; 
    138138        contentView = [[self window] contentView]; 
    139139        enumerator = [_sortedKeys reverseObjectEnumerator]; 
     
    150150                value = [_allValues objectForKey:key]; 
    151151                 
    152                 nameTextField = [self _textFieldFromArchetype:_nameTextField]; 
    153                 [nameTextField setStringValue:[key stringByAppendingString:@":"]]; 
    154                  
    155                 valueTextField = [self _textFieldFromArchetype:_valueTextField]; 
    156                 [valueTextField setStringValue:value]; 
     152                nameTextField = [self _textFieldLikeTextField:_nameTextField withStringValue:[key stringByAppendingString:@":"]]; 
     153                valueTextField = [self _textFieldLikeTextField:_valueTextField withStringValue:value]; 
    157154                 
    158155                nameSize = [[nameTextField cell] cellSizeForBounds:NSMakeRect(0.0, 0.0, [nameTextField frame].size.width, 10000.0)]; 
     
    168165                [contentView addSubview:valueTextField]; 
    169166                 
    170                 verticalOffset += height + 2.0; 
     167                verticalOffset += height + 6.0; 
    171168        } 
    172169         
    173170        windowFrame = [[self window] frame]; 
    174171        height = windowFrame.size.height; 
    175         windowFrame.size.height = verticalOffset + 28.0; 
     172        windowFrame.size.height = verticalOffset + 26.0; 
    176173        windowFrame.origin.y -= windowFrame.size.height - height; 
    177         [[self window] setFrame:windowFrame display:YES animate:YES]; 
    178 } 
    179  
    180  
    181  
    182 - (NSTextField *)_textFieldFromArchetype:(NSTextField *)archetypeTextField
     174        [[self window] setFrame:windowFrame display:YES animate:NO]; 
     175} 
     176 
     177 
     178 
     179- (NSTextField *)_textFieldLikeTextField:(NSTextField *)archetypeTextField withStringValue:(NSString *)string
    183180        NSTextField             *textField; 
    184181         
     
    193190        [textField setDrawsBackground:[archetypeTextField drawsBackground]]; 
    194191        [textField setBackgroundColor:[archetypeTextField backgroundColor]]; 
     192        [textField setStringValue:string]; 
    195193         
    196194        return [textField autorelease]; 
     
    224222                   selector:@selector(browserControllerDidShowFile:) 
    225223                           name:FHBrowserControllerDidShowFile]; 
    226          
    227         [self window]; 
     224         
     225        [(NSPanel *) [self window] setBecomesKeyOnlyIfNeeded:YES]; 
    228226         
    229227        return self;