mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix input text sizing
This commit is contained in:
parent
79091c3dd8
commit
44b9d681b5
@ -446,7 +446,7 @@
|
||||
textSize = [displayedComponents sizeForConstrainedWidth:constrainedSize.width];
|
||||
}
|
||||
|
||||
CGFloat width = std::ceil(textSize.width + _textContainerInset.left + _textContainerInset.right);
|
||||
CGFloat width = std::ceil(constrainedSize.width);
|
||||
CGFloat height = std::ceil(textSize.height + _textContainerInset.top + _textContainerInset.bottom);
|
||||
return CGSizeMake(std::fmin(width, constrainedSize.width), std::fmin(height, constrainedSize.height));
|
||||
}
|
||||
|
@ -129,7 +129,7 @@
|
||||
|
||||
// If our text-view's width is already the constrained width, we can use our existing TextKit stack for this sizing calculation.
|
||||
// Otherwise, we create a temporary stack to size for `constrainedWidth`.
|
||||
/*if (CGRectGetWidth(components.textView.threadSafeBounds) != constrainedWidth)*/ {
|
||||
if (CGRectGetWidth(components.textView.threadSafeBounds) != constrainedWidth) {
|
||||
components = [ASTextKitComponents componentsWithAttributedSeedString:components.textStorage textContainerSize:CGSizeMake(constrainedWidth, CGFLOAT_MAX)];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user