Move size computations to PillAttachmentViewProvider

This commit is contained in:
aringenbach
2022-05-09 16:53:38 +02:00
parent 42a5574d4f
commit 0b5685a4e8
3 changed files with 67 additions and 46 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ class PillTextAttachment: NSTextAttachment {
private extension PillTextAttachment {
func updateBounds() {
guard let data = data else { return }
let pillSize = PillAttachmentView.size(forDisplayname: data.displayText)
let pillSize = PillAttachmentViewProvider.size(forDisplayText: data.displayText)
self.bounds = CGRect(origin: CGPoint(x: 0.0, y: Self.pillVerticalOffset), size: pillSize)
}
}