Merge branch 'develop' into feature/list_threecolumn_datausage_divider

* develop:
  Revert "Merge branch 'feature/usenewfont' into 'develop'"
  green
  use new font for legacy
  removed comment
  images and links and stuff
This commit is contained in:
Kruthika KP 2020-04-09 10:23:39 +05:30
commit 9386267bc2
4 changed files with 14 additions and 16 deletions

View File

@ -47,11 +47,11 @@ open class ExternalLink: Link {
trailingAnchor.constraint(greaterThanOrEqualTo: exportIcon.trailingAnchor).isActive = true
if let titleLabel = titleLabel {
let dimension = round(0.6 * titleLabel.font.pointSize)
let dimension = titleLabel.font.pointSize
exportIcon.heightAnchor.constraint(equalToConstant: dimension).isActive = true
exportIcon.widthAnchor.constraint(equalToConstant: dimension).isActive = true
exportIcon.leadingAnchor.constraint(equalTo: titleLabel.trailingAnchor, constant: PaddingOne).isActive = true
exportIcon.bottomAnchor.constraint(equalTo: titleLabel.lastBaselineAnchor).isActive = true
exportIcon.leadingAnchor.constraint(equalTo: titleLabel.trailingAnchor, constant: 4).isActive = true
exportIcon.bottomAnchor.constraint(equalTo: titleLabel.lastBaselineAnchor, constant: 3).isActive = true
}
}
}

View File

@ -760,8 +760,6 @@ public typealias ActionBlock = () -> ()
*/
static func getTextAttachmentImage(name: String = "externalLink", dimension: CGFloat) -> NSTextAttachment {
let dimension = round(dimension * 0.8)
let imageAttachment = NSTextAttachment()
imageAttachment.image = MVMCoreUIUtility.imageNamed(name)
imageAttachment.bounds = CGRect(x: 0, y: 0, width: dimension, height: dimension)
@ -771,23 +769,18 @@ 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)
DispatchQueue.global(qos: .default).async {
guard let url = URL(string: url),
let data = try? Data(contentsOf: url)
else { return }
DispatchQueue.main.sync {
imageAttachment.image = UIImage(data: data)
label.setNeedsDisplay()
MVMCoreCache.shared()?.getImage(url, useWidth: false, widthForS7: 0, useHeight: false, heightForS7: 0, localFallbackImageName: nil) { image, data, _ in
DispatchQueue.main.sync {
imageAttachment.image = image
label.setNeedsDisplay()
}
}
}
return imageAttachment
}

View File

@ -24,6 +24,7 @@
+ (nonnull UIColor *)mvmOrange;
+ (nonnull UIColor *)mfPumpkinColor;
+ (nonnull UIColor *)mfShamrock;
+ (nonnull UIColor *)mvmGreen;
+ (nonnull UIColor *)mfCerulean;
+ (nonnull UIColor *)mfWhiteTwo;

View File

@ -61,6 +61,10 @@
return [UIColor mfColor8bitsWithRed:0 green:134 blue:49 alpha:1.0];
}
+ (nonnull UIColor *)mvmGreen {
return [UIColor mfColor8bitsWithRed:0 green:134 blue:48 alpha:1.0];
}
+ (nonnull UIColor *)mfCerulean {
return [UIColor mfColor8bitsWithRed:0 green:122 blue:184 alpha:1.0];
}