mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-02 18:23:35 +00:00
Sizing code had been added to CPTextField initWithCoder that required resizing in NSTextField NS_initWithCoder to be removed. However, the sizing code was removed, so this code has to be re-inserted.
This commit is contained in:
committed by
Randall Luecke
parent
c8afcde4e5
commit
ace66b2b2f
@@ -58,14 +58,19 @@
|
||||
var textColor = [cell textColor],
|
||||
defaultColor = [self currentValueForThemeAttribute:@"text-color"];
|
||||
|
||||
// Don't change the text color if it is not the default, that messes up the theme lookups later
|
||||
// Don't change the text color if it is not the default, that messes up the theme lookups later
|
||||
if (![textColor isEqual:defaultColor])
|
||||
[self setTextColor:[cell textColor]];
|
||||
|
||||
var frame = [self frame];
|
||||
// Only adjust the origin and size if this is a bezeled textfield.
|
||||
// This ensures that labels positioned in IB are properly positioned after nibcib.
|
||||
if ([self isBezeled])
|
||||
{
|
||||
var frame = [self frame];
|
||||
|
||||
[self setFrameOrigin:CGPointMake(frame.origin.x, frame.origin.y)];
|
||||
[self setFrameSize:CGSizeMake(frame.size.width, frame.size.height)];
|
||||
[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