Changeset 4860
- Timestamp:
- 08/15/07 21:28:42 (1 year ago)
- Files:
-
- Footagehead/trunk/FHImageView.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Footagehead/trunk/FHImageView.m
r4732 r4860 78 78 NSSize contentSize, imageSize, combinedImageSize, frameSize; 79 79 CGFloat scrollerWidth; 80 double diff; 80 81 81 82 if(_adjustingScaling) … … 115 116 scrollerWidth = [NSScroller scrollerWidth]; 116 117 117 if(imageSize.width > contentSize.width) { 118 diff = (contentSize.width / imageSize.width) * scrollerWidth; 119 120 if(imageSize.width - diff > contentSize.width) { 118 121 [_scrollView setHasHorizontalScroller:YES]; 119 122 … … 121 124 122 125 if(imageSize.height > contentSize.height - scrollerWidth) 123 frameSize.width -= (contentSize.width / imageSize.width) * scrollerWidth;126 frameSize.width -= diff; 124 127 } 125 128 126 if(imageSize.height > contentSize.height) { 129 diff = (contentSize.height / imageSize.height) * scrollerWidth; 130 131 if(imageSize.height - diff > contentSize.height) { 127 132 [_scrollView setHasVerticalScroller:YES]; 128 133 129 134 frameSize.width -= scrollerWidth; 130 135 131 136 if(imageSize.width > contentSize.width - scrollerWidth) 132 frameSize.height -= (contentSize.height / imageSize.height) * scrollerWidth;137 frameSize.height -= diff; 133 138 } 134 139
