|
@@ -196,7 +196,7 @@ import Cocoa
|
|
|
|
|
|
let menu = NSMenu()
|
|
|
for (index, fontName) in fonts.enumerated() {
|
|
|
- if let font = NSFont(name: fontName, size: annotation!.fontSize()) {
|
|
|
+ if let font = NSFont(name: fontName, size: 12.0/*annotation!.fontSize()*/) {
|
|
|
let attributes: [NSAttributedString.Key: Any] = [.font: font]
|
|
|
let attributedString = NSAttributedString(string: fontName, attributes: attributes)
|
|
|
let item = NSMenuItem()
|
|
@@ -245,7 +245,7 @@ import Cocoa
|
|
|
let style = annotationFont.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.face) as? String
|
|
|
let menu = NSMenu()
|
|
|
for (index, fontName) in fonts.enumerated() {
|
|
|
- if let font = NSFont(name: fontName, size: annotationModel.fontSize()) {
|
|
|
+ if let font = NSFont(name: fontName, size: 12.0/*annotation!.fontSize()*/) {
|
|
|
let attributes: [NSAttributedString.Key: Any] = [.font: font]
|
|
|
let attributedString = NSAttributedString(string: fontName, attributes: attributes)
|
|
|
let item = NSMenuItem()
|
|
@@ -278,22 +278,22 @@ import Cocoa
|
|
|
func updateAnnotationMode() {
|
|
|
let userDefaults = UserDefaults.standard
|
|
|
if formMode == .textField {
|
|
|
- userDefaults.safe_setColor(annotationModel.backgroundColor(), forKey: SKAnnotationTextWidgetBackgroundColorKey)
|
|
|
- userDefaults.safe_setColor(annotationModel.fontColor(), forKey: SKAnnotationTextWidgetFontColorKey)
|
|
|
- userDefaults.set(annotationModel.alignment().rawValue, forKey: SKAnnotationTextWidgetAlignmenKey)
|
|
|
+ userDefaults.safe_setColor(annotationModel.backgroundColor(), forKey: CAnnotationTextWidgetBackgroundColorKey)
|
|
|
+ userDefaults.safe_setColor(annotationModel.fontColor(), forKey: CAnnotationTextWidgetFontColorKey)
|
|
|
+ userDefaults.set(annotationModel.alignment().rawValue, forKey: CAnnotationTextWidgetAlignmenKey)
|
|
|
userDefaults.set(annotationModel.fontName(), forKey: SKAnnotationTextWidgetFontNameKey)
|
|
|
userDefaults.set(annotationModel.fontSize(), forKey: SKAnnotationTextWidgetFontSizeKey)
|
|
|
userDefaults.set(annotationModel.isMultiline(), forKey: SKAnnotationTextMultilineKey)
|
|
|
} else if formMode == .comboBox {
|
|
|
- userDefaults.safe_setColor(annotationModel.backgroundColor(), forKey: SKAnnotationChoiceWidgetBackgroundColorKey)
|
|
|
- userDefaults.safe_setColor(annotationModel.fontColor(), forKey: SKAnnotationChoiceWidgetFontColorKey)
|
|
|
- userDefaults.set(annotationModel.fontName(), forKey: SKAnnotationChoiceWidgetFontNameKey)
|
|
|
- userDefaults.set(annotationModel.fontSize(), forKey: SKAnnotationChoiceWidgetFontSizeKey)
|
|
|
+ userDefaults.safe_setColor(annotationModel.backgroundColor(), forKey: CAnnotationChoiceWidgetBackgroundColorKey)
|
|
|
+ userDefaults.safe_setColor(annotationModel.fontColor(), forKey: CAnnotationChoiceWidgetFontColorKey)
|
|
|
+ userDefaults.set(annotationModel.fontName(), forKey: CAnnotationChoiceWidgetFontNameKey)
|
|
|
+ userDefaults.set(annotationModel.fontSize(), forKey: CAnnotationChoiceWidgetFontSizeKey)
|
|
|
} else if formMode == .listMenu {
|
|
|
- userDefaults.safe_setColor(annotationModel.backgroundColor(), forKey: SKAnnotationChoiceListWidgetBackgroundColorKey)
|
|
|
- userDefaults.safe_setColor(annotationModel.fontColor(), forKey: SKAnnotationChoiceListWidgetFontColorKey)
|
|
|
- userDefaults.set(annotationModel.fontName(), forKey: SKAnnotationChoiceListWidgetFontNameKey)
|
|
|
- userDefaults.set(annotationModel.fontSize(), forKey: SKAnnotationChoiceListWidgetFontSizeKey)
|
|
|
+ userDefaults.safe_setColor(annotationModel.backgroundColor(), forKey: CAnnotationChoiceListWidgetBackgroundColorKey)
|
|
|
+ userDefaults.safe_setColor(annotationModel.fontColor(), forKey: CAnnotationChoiceListWidgetFontColorKey)
|
|
|
+ userDefaults.set(annotationModel.fontName(), forKey: CAnnotationChoiceListWidgetFontNameKey)
|
|
|
+ userDefaults.set(annotationModel.fontSize(), forKey: CAnnotationChoiceListWidgetFontSizeKey)
|
|
|
}
|
|
|
}
|
|
|
|