Revision: 7557
http://skim-app.svn.sourceforge.net/skim-app/?rev=7557&view=rev
Author: hofman
Date: 2011-12-04 22:58:25 +0000 (Sun, 04 Dec 2011)
Log Message:
-----------
draw icon first, so it stays in the background, e.g. below the focus ring
Modified Paths:
--------------
trunk/SKTextWithIconCell.m
Modified: trunk/SKTextWithIconCell.m
===================================================================
--- trunk/SKTextWithIconCell.m 2011-12-04 16:27:52 UTC (rev 7556)
+++ trunk/SKTextWithIconCell.m 2011-12-04 22:58:25 UTC (rev 7557)
@@ -112,17 +112,17 @@
}
- (void)drawInteriorWithFrame:(NSRect)aRect inView:(NSView *)controlView {
+ // Draw the image
+ NSRect imageRect = [self iconRectForBounds:aRect];
+ imageRect = SKCenterRectVertically(imageRect, NSWidth(imageRect),
[controlView isFlipped]);
+ imageRect.origin.y += [controlView isFlipped] ? -IMAGE_OFFSET :
IMAGE_OFFSET;
+ [imageCell drawInteriorWithFrame:imageRect inView:controlView];
+
// let super draw the text, but vertically center the text for tall cells,
because NSTextFieldCell aligns at the top
NSRect textRect = [self textRectForBounds:aRect];
if (NSHeight(textRect) > [self cellSize].height + 2.0)
textRect = SKCenterRectVertically(textRect, [self cellSize].height +
2.0, [controlView isFlipped]);
[super drawInteriorWithFrame:textRect inView:controlView];
-
- // Draw the image
- NSRect imageRect = [self iconRectForBounds:aRect];
- imageRect = SKCenterRectVertically(imageRect, NSWidth(imageRect),
[controlView isFlipped]);
- imageRect.origin.y += [controlView isFlipped] ? -IMAGE_OFFSET :
IMAGE_OFFSET;
- [imageCell drawInteriorWithFrame:imageRect inView:controlView];
}
- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView
editor:(NSText *)textObj delegate:(id)anObject start:(NSInteger)selStart
length:(NSInteger)selLength {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit