Revision: 27810
http://sourceforge.net/p/bibdesk/svn/27810
Author: hofman
Date: 2022-08-18 14:14:46 +0000 (Thu, 18 Aug 2022)
Log Message:
-----------
calculate image width more directly
Modified Paths:
--------------
trunk/bibdesk/BDSKGroupOutlineView.m
Modified: trunk/bibdesk/BDSKGroupOutlineView.m
===================================================================
--- trunk/bibdesk/BDSKGroupOutlineView.m 2022-08-18 14:10:00 UTC (rev
27809)
+++ trunk/bibdesk/BDSKGroupOutlineView.m 2022-08-18 14:14:46 UTC (rev
27810)
@@ -129,12 +129,11 @@
[countString replaceCharactersInRange:NSMakeRange(0, [countString
length]) withString:[NSString stringWithFormat:@"%ld", (long)count]];
NSSize size = [countString
boundingRectWithSize:NSMakeSize(CGFLOAT_MAX, CGFLOAT_MAX) options:0].size;
if (count == -1)
- size.width = size.height;
+ size.width = size.height + 2.0;
else if (count == 0)
- size.width = -2.0;
+ size.width = 0.0;
else
- size.width += M_SQRT1_2 * size.height;
- size.width = ceil(size.width - 0.1) + 2.0;
+ size.width = ceil(size.width + M_SQRT1_2 * size.height - 0.1) +
2.0;
countImage = [[[NSImage alloc] initWithSize:size] autorelease];
if (count > 0) {
[countImage lockFocus];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit