Merge pull request #1267 from primalmotion/nib2cib-do-not-truncate-bold-labels

Do not truncate bold labels.

So this is a temp fix as @aparajita has a better way to handle this. As the patch is very straightforward, it will be easy to revert it when a more correct fix will come up. But while waiting, I think it's a good idea to have correct displaying of the bold labels.
This commit is contained in:
Antoine Mercadal committed 2011-12-07 10:23:06 -08:00
commit 1a73abe7c3
1 file changed
+7
+7
View File
@@ -71,6 +71,13 @@
[self setFrameOrigin:CGPointMake(frame.origin.x - 6.0, frame.origin.y - 3.0)];
[self setFrameSize:CGSizeMake(frame.size.width + 8.0, frame.size.height + 7.0)];
}
else if ([[self font] isBold])
{
var frame = [self frame];
[self setFrameOrigin:CGPointMake(frame.origin.x, frame.origin.y - 1.0)];
[self setFrameSize:CGSizeMake(frame.size.width, frame.size.height + 2.0)];
}
CPLog.debug("NSTextField: title=\"" + [self stringValue] + "\", placeholder=" + ([cell placeholderString] == null ? "<none>" : '"' + [cell placeholderString] + '"') + ", isBordered=" + [self isBordered] + ", isBezeled=" + [self isBezeled] + ", bezelStyle=" + [self bezelStyle]);
}