mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-31 07:53:35 +00:00
fix: CPTokenFieldToken impacted by new CPTextField sizeToFit behaviour
This commit is contained in:
@@ -974,9 +974,15 @@ var CPThemeStateAutoCompleting = @"CPThemeStateAutoCompleting",
|
||||
[super sizeToFit];
|
||||
|
||||
var size = [self bounds].size,
|
||||
minSize = [self currentValueForThemeAttribute:@"min-size"];
|
||||
minSize = [self currentValueForThemeAttribute:@"min-size"],
|
||||
contentInset = [self currentValueForThemeAttribute:@"content-inset"];
|
||||
|
||||
size.height = minSize.height;
|
||||
|
||||
// this is necessary to recalculate the width of the token due to new CPTextField sizeToFit
|
||||
// behaviour that doesn't resize width on bezeled textfield
|
||||
size.width = [([self stringValue] || @" ") sizeWithFont:[self font]].width + contentInset.left + contentInset.right;
|
||||
|
||||
[self setFrameSize:size];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user