Changeset 24075
- Timestamp:
- 06/26/2008 09:17:04 PM (7 months ago)
- Files:
-
- trunk/Source/KNShelfSplitView.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/KNShelfSplitView.m
r24064 r24075 222 222 } 223 223 224 -( float)minimumShelfWidth224 -(void)setShelfWidthNoConstraints:(float)aWidth 225 225 { 226 // The shelf can never be completely closed. We always have at least enough to show our resize thumb, otherwise 227 // if the delegate responds to shelfSplitView:validateWidth:, we use that width as our minimum shelf size 228 float minShelf = THUMB_WIDTH; 229 if( delegateHasValidateWidth ){ 230 float requestedWidth = [delegate shelfSplitView:self validateWidth: 0]; 231 if( requestedWidth > minShelf ){ 232 minShelf = requestedWidth; 233 } 234 } 235 236 return minShelf; 226 currentShelfWidth = aWidth; 227 228 [self recalculateSizes]; 237 229 } 238 230 … … 429 421 if([anEvent clickCount] == 2){ 430 422 if( (activeControlPart == CONTROL_PART_RESIZE_THUMB) || (activeControlPart == CONTROL_PART_RESIZE_BAR) ){ 431 float minShelfWidth = [self minimumShelfWidth]; 432 if (currentShelfWidth > minShelfWidth) { 423 if (currentShelfWidth > NSWidth(resizeBarRect)) { 433 424 prevShelfWidthBeforeDoubleClick = currentShelfWidth; 434 [self setShelfWidth :minShelfWidth];425 [self setShelfWidthNoConstraints:NSWidth(resizeBarRect)]; 435 426 } else { 436 427 [self setShelfWidth:prevShelfWidthBeforeDoubleClick];