Permalink
Browse files

Hopefully a solution to misplaced disclosure triangles on Lion.

  • Loading branch information...
1 parent bed1433 commit b2d7fcfa82c4a62512073897b9c5c17ea11263db @mikeabdullah mikeabdullah committed Jul 22, 2011
Showing with 9 additions and 3 deletions.
  1. +9 −3 App/KTSiteOutlineView.m
View
@@ -139,12 +139,18 @@ - (NSRect)frameOfCellAtColumn:(NSInteger)columnIndex row:(NSInteger)rowIndex;
- (NSRect)frameOfOutlineCellAtRow:(NSInteger)row
{
- // Root page doesn't want disclosure triangle
- // Everything else needs to move to the left to match that
+ // Root page doesn't want disclosure triangle…
if (row > 0)
{
NSRect result = [super frameOfOutlineCellAtRow:row];
- result.origin.x -= [self indentationPerLevel];
+ NSRect cellFrame = [self frameOfCellAtColumn:0 row:row];
+
+ // …everything else needs to move to the left to match that,
+ // EXCEPT that Lion does this for us, so only apply if needed
+ if (result.origin.x > cellFrame.origin.x)
+ {
+ result.origin.x -= [self indentationPerLevel];
+ }
return result;
}

0 comments on commit b2d7fcf

Please sign in to comment.