Changeset 3875

Show
Ignore:
Timestamp:
03/04/06 17:56:18 (3 years ago)
Author:
morris
Message:

Make zoom button toggle

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Footagehead/trunk/English.lproj/MainMenu.nib/classes.nib

    r3407 r3875  
    5151                "_splitView" = WISplitView;  
    5252                "_tableView" = WITableView;  
     53                "_zoomButton" = NSButton;  
    5354            };  
    5455            SUPERCLASS = WIWindowController;  
  • Footagehead/trunk/English.lproj/MainMenu.nib/info.nib

    r3407 r3875  
    2121        </array> 
    2222        <key>IBSystem Version</key> 
    23         <string>8F46</string> 
     23        <string>8H14</string> 
    2424</dict> 
    2525</plist> 
  • Footagehead/trunk/FHController.h

    r3400 r3875  
    4141        IBOutlet NSScrollView                   *_scrollView; 
    4242         
     43        IBOutlet NSButton                               *_zoomButton; 
    4344        IBOutlet NSButton                               *_revealInFinderButton; 
    4445        IBOutlet NSButton                               *_moveToTrashButton; 
  • Footagehead/trunk/FHController.m

    r3426 r3875  
    3737#import "FHImageView.h" 
    3838#import "FHSettings.h" 
    39  
    40 #ifndef CLAMP 
    41 #define CLAMP(x, min, max) \ 
    42         (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x))) 
    43 #endif 
    44  
    4539 
    4640static FHController             *sharedController; 
     
    773767        [self setWindowFrameAutosaveName:@"Footagehead"]; 
    774768         
     769        if([FHSettings intForKey:FHImageScaling] == NSScaleNone) 
     770                [_zoomButton setState:NSOnState]; 
     771         
    775772        // --- set up fullscreen panel 
    776773        [self _reloadScreens]; 
     
    12891286        index = 0; 
    12901287        step = (double) count / 10.0; 
    1291         step = CLAMP(step, 2, 10); 
     1288        step = WI_CLAMP(step, 2, 10); 
    12921289 
    12931290        if((unsigned int) row > step) { 
     
    13221319        index = count - 1; 
    13231320        step = (double) count / 10.0; 
    1324         step = CLAMP(step, 2, 10); 
     1321        step = WI_CLAMP(step, 2, 10); 
    13251322         
    13261323        if((unsigned int) row + step < count) { 
  • Footagehead/trunk/FHTableView.m

    r3386 r3875  
    5050                        if((up && [scroller floatValue] > 0.0f) || (!up && [scroller floatValue] < 1.0f)) { 
    5151                                rect = [_imageScrollView documentVisibleRect]; 
    52                                 delta = 0.5 * rect.size.height;  
     52                                delta = 0.75 * rect.size.height;  
    5353                                rect.origin.y += up ? delta : -delta; 
    5454                                [_imageView scrollPoint:rect.origin]; 
     
    121121                           (c == NSDownArrowFunctionKey && [scroller floatValue] < 1.0f)) { 
    122122                                rect = [_imageScrollView documentVisibleRect]; 
    123                                 delta = 0.5 * rect.size.height;  
     123                                delta = 0.75 * rect.size.height;  
    124124                                rect.origin.y += (c == NSUpArrowFunctionKey) ? delta : -delta; 
    125125                                [_imageView scrollPoint:rect.origin]; 
     
    136136                           (c == NSLeftArrowFunctionKey  && [scroller floatValue] > 0.0f)) { 
    137137                                rect = [_imageScrollView documentVisibleRect]; 
    138                                 delta = 0.5 * rect.size.height;  
     138                                delta = 0.75 * rect.size.height;  
    139139                                rect.origin.x += (c == NSRightArrowFunctionKey) ? delta : -delta; 
    140140                                [_imageView scrollPoint:rect.origin];