Don't adjust the origin and size of a text field during nib2cib

This interferes with Aparajita's auto-sizing of controls in initWithCoder:. Also it's better to calculate the size in initWithCoder: because the theme information is available.
This commit is contained in:
Klaas Pieter Annema
2010-10-19 15:07:01 +02:00
parent 991e213d02
commit 2eb27a6492
-8
View File
@@ -67,14 +67,6 @@
[self setFrameOrigin:CGPointMake(frame.origin.x, frame.origin.y)];
[self setFrameSize:CGSizeMake(frame.size.width, frame.size.height)];
// Only adjust the origin and size if this is a bezeled textfield
// this makes sure that labels positioned in IB are properly positioned after nibcib
if ([self isBezeled])
{
[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] + ")");
}