Revision: 18285
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18285&view=rev
Author: hofman
Date: 2011-12-04 22:59:05 +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/bibdesk/BDSKTextWithIconCell.m
Modified: trunk/bibdesk/BDSKTextWithIconCell.m
===================================================================
--- trunk/bibdesk/BDSKTextWithIconCell.m 2011-12-04 11:07:23 UTC (rev
18284)
+++ trunk/bibdesk/BDSKTextWithIconCell.m 2011-12-04 22:59:05 UTC (rev
18285)
@@ -161,18 +161,18 @@
}
- (void)drawInteriorWithFrame:(NSRect)aRect inView:(NSView *)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 = BDSKCenterRectVertically(textRect, [self cellSize].height +
2.0, [controlView isFlipped]);
- [super drawInteriorWithFrame:textRect inView:controlView];
-
// Draw the image
NSRect imageRect = [self iconRectForBounds:aRect];
imageRect = BDSKCenterRectVertically(imageRect, NSWidth(imageRect),
[controlView isFlipped]);
if ([self isBordered] == NO && [self isBezeled] == NO)
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 = BDSKCenterRectVertically(textRect, [self cellSize].height +
2.0, [controlView isFlipped]);
+ [super drawInteriorWithFrame:textRect inView:controlView];
}
- (NSImage *)icon {
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
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit