Permalink
Browse files

[models] Don't draw the highlighted state underneath the cell border.

  • Loading branch information...
1 parent 3923932 commit 73d3fe39fffcb0f5063d0e20dbde592c26f8c722 @jverkoey committed Sep 13, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/models/src/NICellBackgrounds.m
@@ -321,7 +321,13 @@ - (UIImage *)_imageForFirst:(BOOL)first last:(BOOL)last highlighted:(BOOL)highli
}
CGContextSaveGState(cx);
- [self _applyPathToContext:cx rect:contentFrame isFirst:first isLast:last];
+ if (highlighted && !last) {
+ CGRect noBorderContentFrame = NIRectContract(contentFrame, 0, 1);
+ [self _applyPathToContext:cx rect:noBorderContentFrame isFirst:first isLast:last];
+
+ } else {
+ [self _applyPathToContext:cx rect:contentFrame isFirst:first isLast:last];
+ }
CGContextFillPath(cx);
CGContextRestoreGState(cx);

0 comments on commit 73d3fe3

Please sign in to comment.