Fix CPTextField + nib2cib

This commit is contained in:
Ross Boucher committed 2009-04-15 16:20:39 -07:00
1 parent 844919cfda
commit 8b9ae1c1b8
2 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -602,7 +602,7 @@ CPTextFieldStatePlaceholder = 1 << 13;
- (void)sizeToFit
{
var size = [(_value || " ") sizeWithFont:[self font]],
var size = [([self stringValue] || " ") sizeWithFont:[self font]],
contentInset = [self currentValueForThemedAttributeName:@"content-inset"];
[self setFrameSize:CGSizeMake(size.width + contentInset.left + contentInset.right, size.height + contentInset.top + contentInset.bottom)];
+5
View File
@@ -30,6 +30,11 @@
[self setTextColor:[cell textColor]];
var frame = [self frame];
[self setFrameOrigin:CGPointMake(frame.origin.x - 4.0, frame.origin.y - 4.0)];
[self setFrameSize:CGSizeMake(frame.size.width + 8.0, frame.size.height + 8.0)];
CPLog.debug([self stringValue] + " => isBordered=" + [self isBordered] + ", isBezeled=" + [self isBezeled] + ", bezelStyle=" + [self bezelStyle] + "("+[cell stringValue]+", " + [cell placeholderString] + ")");
}