Changeset 23278
- Timestamp:
- 05/02/2008 07:56:57 PM (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Frameworks/Adium Framework/Source/AIListOutlineView.m
r23264 r23278 487 487 488 488 // Let super handle it if it's not a group, or the command key is down (dealing with selection) 489 if (![[self window] isKeyWindow] || ![item isKindOfClass:[AIListGroup class]] || [NSEvent cmdKey]) { 489 // Allow clickthroughs for triangle disclosure only. 490 if (![item isKindOfClass:[AIListGroup class]] || 491 [NSEvent cmdKey] || 492 (![[self window] isKeyWindow] && (viewPoint.x > [self frameOfCellAtColumn:0 row:row].size.height))) { 493 //XXX - This is kind of a hack. We need to check < WidthOfDisclosureTriangle, and are using the fact that 494 // the disclosure width is about the same as the height of the row to fudge it. -ai) { 490 495 [super mouseDown:theEvent]; 491 496 return; trunk/Frameworks/AIUtilities Framework/Source/AIVariableHeightOutlineView.m
r23262 r23278 74 74 } 75 75 76 //Handle mouseDown events to toggle expandable items when they are clicked77 - (void)mouseDown:(NSEvent *)theEvent78 {79 NSPoint viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];80 int row = [self rowAtPoint:viewPoint];81 id item = [self itemAtRow:row];82 83 //Expand/Collapse groups on mouse DOWN instead of mouse up (Makes it feel a ton faster)84 if ((item) &&85 ([self isExpandable:item]) &&86 (viewPoint.x < [self frameOfCellAtColumn:0 row:row].size.height)) {87 //XXX - This is kind of a hack. We need to check < WidthOfDisclosureTriangle, and are using the fact that88 // the disclosure width is about the same as the height of the row to fudge it. -ai89 90 if ([self isItemExpanded:item]) {91 [self collapseItem:item];92 } else {93 [self expandItem:item];94 }95 } else {96 [super mouseDown:theEvent];97 }98 }99 76 //Row height cache ----------------------------------------------------------------------------------------------------- 100 77 #pragma mark Row height cache