adium 3566:9c16238ea418: Noted in `AIVariableHeightOutlineView`'...
commits at adium.im
commits at adium.im
Mon Nov 22 03:49:47 UTC 2010
details: http://hg.adium.im/adium/rev/9c16238ea418
revision: 3566:9c16238ea418
author: Evan Schoenberg
date: Sun Nov 21 21:00:40 2010 -0600
Noted in `AIVariableHeightOutlineView`'s header that _ai_drawRow:clipRect: is a correct drawRow:clipRect: override point, and then followed my own directions in `AIVariableHeightFlexibleColumnsOutlineView`. Fixes drawing in the Events tables. Fixes #14629
(transplanted from 22fb5f71ee728a1d6c4b7870fb256945e184d779)
diffs (47 lines):
diff -r b5035f174e0c -r 9c16238ea418 Frameworks/AIUtilities Framework/Source/AIVariableHeightFlexibleColumnsOutlineView.m
--- a/Frameworks/AIUtilities Framework/Source/AIVariableHeightFlexibleColumnsOutlineView.m Sun Nov 21 17:33:54 2010 -0800
+++ b/Frameworks/AIUtilities Framework/Source/AIVariableHeightFlexibleColumnsOutlineView.m Sun Nov 21 21:00:40 2010 -0600
@@ -34,11 +34,11 @@
}
#pragma mark Drawing
-- (void)drawRow:(NSInteger)row clipRect:(NSRect)rect
+- (BOOL)_ai_drawRow:(NSInteger)row clipRect:(NSRect)rect;
{
if (row >= 0 && row < [self numberOfRows]) { //Somebody keeps calling this method with row = numberOfRows, which is wrong.
if (NSIntersectsRect([self rectOfRow:row], rect) == FALSE)
- return;
+ return NO;
NSArray *tableColumns = [self tableColumns];
id item = [self itemAtRow:row];
@@ -126,6 +126,8 @@
}
}
}
+
+ return YES;
}
@end
diff -r b5035f174e0c -r 9c16238ea418 Frameworks/AIUtilities Framework/Source/AIVariableHeightOutlineView.h
--- a/Frameworks/AIUtilities Framework/Source/AIVariableHeightOutlineView.h Sun Nov 21 17:33:54 2010 -0800
+++ b/Frameworks/AIUtilities Framework/Source/AIVariableHeightOutlineView.h Sun Nov 21 21:00:40 2010 -0600
@@ -77,6 +77,17 @@
@interface AIVariableHeightOutlineView (AIVariableHeightOutlineViewAndSubclasses)
- (void)resetRowHeightCache;
- (void)updateRowHeightCache;
+/*!
+ * @brief Row drawing routine
+ *
+ * Subclasses should implement this rather than drawRow:clipRect: to override drawing.
+ *
+ * AIVariableHeightOutlineView calls this as part of its drawRow:clipRect: implementation, and some drawing operations
+ * may *not* call drawRow:clipRect: at all but rather call this method only.
+ *
+ * @result YES if the row was drawn; NO if the row was not drawn because it is below the clipping rect
+ */
+- (BOOL)_ai_drawRow:(NSInteger)row clipRect:(NSRect)rect;
@end
@interface NSObject (AIVariableHeightGridSupport)
More information about the commits
mailing list