mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-01 18:58:22 +00:00
Fix CPTextField + nib2cib
This commit is contained in:
1 parent
844919cfda
commit
8b9ae1c1b8
2 files changed
+6
-1
No files matched your search
@@ -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)];
|
||||
|
||||
@@ -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] + ")");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user