mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-23 08:09:41 +01:00
Move declaration/initialization of attributes dictionary closer to use
This commit is contained in:
parent
070981553d
commit
951ffeb899
@ -225,8 +225,6 @@ extension NSAttributedString {
|
|||||||
let currentDescriptor = currentFont.fontDescriptor
|
let currentDescriptor = currentFont.fontDescriptor
|
||||||
var descriptor = currentDescriptor.copy() as! FontDescriptor
|
var descriptor = currentDescriptor.copy() as! FontDescriptor
|
||||||
|
|
||||||
var attributes: [NSAttributedString.Key: Any] = [:]
|
|
||||||
|
|
||||||
var symbolicTraits = currentDescriptor.symbolicTraits
|
var symbolicTraits = currentDescriptor.symbolicTraits
|
||||||
|
|
||||||
if styles.contains(.bold) {
|
if styles.contains(.bold) {
|
||||||
@ -262,6 +260,8 @@ extension NSAttributedString {
|
|||||||
descriptor = descriptor.addingAttributes(descriptorAttributes)
|
descriptor = descriptor.addingAttributes(descriptorAttributes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var attributes = [NSAttributedString.Key: Any]()
|
||||||
|
|
||||||
attributes[.font] = Font(descriptor: descriptor, size: baseFont.pointSize)
|
attributes[.font] = Font(descriptor: descriptor, size: baseFont.pointSize)
|
||||||
|
|
||||||
if styles.contains(.strikethrough) {
|
if styles.contains(.strikethrough) {
|
||||||
|
Loading…
Reference in New Issue
Block a user