mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-22 14:35:52 +00:00
fix multiline bezeled textfields being sized when initialized from coder
This commit is contained in:
1 parent
c4a074a92d
commit
802d7d53b0
1 file changed
+6
-1
@@ -1268,8 +1268,13 @@ var CPTextFieldIsEditableKey = "CPTextFieldIsEditableKey",
|
||||
|
||||
// Make sure the frame is big enough
|
||||
var minSize = [self _minimumFrameSize];
|
||||
|
||||
minSize.width = MAX(CGRectGetWidth([self frame]), minSize.width);
|
||||
|
||||
// Only size multiline bezeled textfields if it's to small to fit the content
|
||||
if ([self isBezeled])
|
||||
if ([self lineBreakMode] === CPLineBreakByCharWrapping || [self lineBreakMode] == CPLineBreakByWordWrapping)
|
||||
minSize.height = MAX(CGRectGetHeight([self frame]), minSize.height);
|
||||
|
||||
[self setFrameSize:minSize];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user