Revision: 12166 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12166&view=rev Author: amaxwell Date: 2007-12-31 18:07:19 -0800 (Mon, 31 Dec 2007)
Log Message: ----------- Implement cellSize for the group cell, which fixes expansion rect tooltips. Modified Paths: -------------- trunk/bibdesk/BDSKGroupCell.m Modified: trunk/bibdesk/BDSKGroupCell.m =================================================================== --- trunk/bibdesk/BDSKGroupCell.m 2008-01-01 01:34:25 UTC (rev 12165) +++ trunk/bibdesk/BDSKGroupCell.m 2008-01-01 02:07:19 UTC (rev 12166) @@ -217,6 +217,26 @@ else \ textRect.origin.y += floorf(vOffset); \ +- (NSSize)cellSize; +{ + NSSize cellSize = [super cellSize]; + NSSize countSize = NSZeroSize; + float countSep = 0.0; + if ([[self objectValue] isRetrieving] || [[self objectValue] failedDownload]) { + countSize = NSMakeSize(16, 16); + countSep = 1.0; + } + else if ([[self objectValue] count] > 0) { + countSize = [countString size]; + countSep = 0.5 * countSize.height - 0.5; + } + float countWidth = countSize.width + 2 * countSep + 2 * BORDER_BETWEEN_EDGE_AND_COUNT; + // cellSize.height approximates the icon size + cellSize.width += cellSize.height + countWidth; + cellSize.width += BORDER_BETWEEN_EDGE_AND_IMAGE + BORDER_BETWEEN_IMAGE_AND_TEXT + BORDER_BETWEEN_COUNT_AND_TEXT; + return cellSize; +} + - (NSRect)textRectForBounds:(NSRect)aRect { NSView *controlView = [self controlView]; _calculateDrawingRectsAndSizes; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit