From e0643d834e9cdda42b562bfeb93e43888e63bcb5 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Wed, 28 Aug 2019 10:40:43 -0400 Subject: [PATCH] adding dimension ratio. --- MVMCoreUI/Atoms/Views/Label.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MVMCoreUI/Atoms/Views/Label.swift b/MVMCoreUI/Atoms/Views/Label.swift index 3f17940e..53dd90e1 100644 --- a/MVMCoreUI/Atoms/Views/Label.swift +++ b/MVMCoreUI/Atoms/Views/Label.swift @@ -466,6 +466,8 @@ public typealias ActionBlock = () -> () static func getTextAttachmentFrom(url: String, dimension: CGFloat, label: Label) -> NSTextAttachment { + let dimension = round(dimension * 0.8) + let imageAttachment = NSTextAttachment() imageAttachment.bounds = CGRect(x: 0, y: 0, width: dimension, height: dimension)