|
@@ -271,26 +271,26 @@ import Cocoa
|
|
|
self.nameTextFieldView.layer?.backgroundColor = NSColor(red: 57.0/255.0, green: 58.0/255.0, blue: 70.0/255.0, alpha: 1).cgColor
|
|
|
self.emailTextFieldView.layer?.backgroundColor = NSColor(red: 57.0/255.0, green: 58.0/255.0, blue: 70.0/255.0, alpha: 1).cgColor
|
|
|
|
|
|
- let stringValue : String = NSLocalizedString("By applying for free trial, you confirm that you agree this Privacy Policy.", comment: "")
|
|
|
- let attributedString: NSMutableAttributedString = NSMutableAttributedString(string: NSLocalizedString("By applying for free trial, you confirm that you agree this Privacy Policy.", comment: ""))
|
|
|
- let privacyPolicy : String = NSLocalizedString("Privacy Policy.", comment: "")
|
|
|
-
|
|
|
- let allRange = (stringValue as NSString).range(of: stringValue)
|
|
|
- attributedString.addAttributes([NSAttributedString.Key.foregroundColor : KMAppearance.Layout.w70Color()], range: allRange)
|
|
|
- attributedString.addAttributes([NSAttributedString.Key.font :NSFont(name: "SFProText-Regular", size: 12.0) as Any], range: allRange)
|
|
|
-
|
|
|
- let urlString : String = "https://www.pdfreaderpro.com/privacy-policy"
|
|
|
- let encodedURLString : String = urlString.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!
|
|
|
- let linkRange = (stringValue as NSString).range(of: privacyPolicy)
|
|
|
- attributedString.addAttribute(.link, value: NSURL(string: encodedURLString)!, range: linkRange)
|
|
|
- attributedString.addAttribute(.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: linkRange)
|
|
|
+// let stringValue : String = NSLocalizedString("By applying for free trial, you confirm that you agree this Privacy Policy.", comment: "")
|
|
|
+// let attributedString: NSMutableAttributedString = NSMutableAttributedString(string: NSLocalizedString("By applying for free trial, you confirm that you agree this Privacy Policy.", comment: ""))
|
|
|
+// let privacyPolicy : String = NSLocalizedString("Privacy Policy.", comment: "")
|
|
|
+//
|
|
|
+// let allRange = (stringValue as NSString).range(of: stringValue)
|
|
|
+// attributedString.addAttributes([NSAttributedString.Key.foregroundColor : KMAppearance.Layout.w70Color()], range: allRange)
|
|
|
+// attributedString.addAttributes([NSAttributedString.Key.font :NSFont(name: "SFProText-Regular", size: 12.0) as Any], range: allRange)
|
|
|
+//
|
|
|
+// let urlString : String = "https://www.pdfreaderpro.com/privacy-policy"
|
|
|
+// let encodedURLString : String = urlString.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!
|
|
|
+// let linkRange = (stringValue as NSString).range(of: privacyPolicy)
|
|
|
+// attributedString.addAttribute(.link, value: NSURL(string: encodedURLString)!, range: linkRange)
|
|
|
+// attributedString.addAttribute(.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: linkRange)
|
|
|
|
|
|
self.bottomTextView.linkTextAttributes = [
|
|
|
NSAttributedString.Key.foregroundColor: KMAppearance.Interactive.a0Color(),
|
|
|
NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue
|
|
|
]
|
|
|
|
|
|
- self.bottomTextView.textStorage?.setAttributedString(attributedString)
|
|
|
+// self.bottomTextView.textStorage?.setAttributedString(attributedString)
|
|
|
self.bottomTextView.isEditable = false // TextView不可编辑
|
|
|
self.bottomTextView.isSelectable = true // TextView可选择
|
|
|
self.bottomTextView.sizeToFit()
|
|
@@ -343,19 +343,19 @@ import Cocoa
|
|
|
self.nameTextFieldView.layer?.backgroundColor = NSColor(red: 235.0/255.0, green: 236.0/255.0, blue: 250.0/255.0, alpha: 1).cgColor
|
|
|
self.emailTextFieldView.layer?.backgroundColor = NSColor(red: 235.0/255.0, green: 236.0/255.0, blue: 250.0/255.0, alpha: 1).cgColor
|
|
|
|
|
|
- let stringValue : String = NSLocalizedString("By applying for free trial, you confirm that you agree this Privacy Policy.", comment: "")
|
|
|
- let attributedString: NSMutableAttributedString = NSMutableAttributedString(string: NSLocalizedString("By applying for free trial, you confirm that you agree this Privacy Policy.", comment: ""))
|
|
|
- let privacyPolicy : String = NSLocalizedString("Privacy Policy.", comment: "")
|
|
|
-
|
|
|
- let urlString : String = "https://www.pdfreaderpro.com/privacy-policy"
|
|
|
- let encodedURLString : String = urlString.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!
|
|
|
- let linkRange = (stringValue as NSString).range(of: privacyPolicy)
|
|
|
- attributedString.addAttribute(NSAttributedString.Key.link, value: NSURL(string: encodedURLString)!, range: linkRange)
|
|
|
- attributedString.addAttribute(NSAttributedString.Key.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: linkRange)
|
|
|
-
|
|
|
- let allRange = (stringValue as NSString).range(of: stringValue)
|
|
|
- attributedString.addAttributes([NSAttributedString.Key.foregroundColor : KMAppearance.Layout.h1Color()], range: allRange)
|
|
|
- attributedString.addAttributes([NSAttributedString.Key.font :NSFont(name: "SFProText-Regular", size: 12.0) as Any], range: allRange)
|
|
|
+// let stringValue : String = NSLocalizedString("By applying for free trial, you confirm that you agree this Privacy Policy.", comment: "")
|
|
|
+// let attributedString: NSMutableAttributedString = NSMutableAttributedString(string: NSLocalizedString("By applying for free trial, you confirm that you agree this Privacy Policy.", comment: ""))
|
|
|
+// let privacyPolicy : String = NSLocalizedString("Privacy Policy.", comment: "")
|
|
|
+//
|
|
|
+// let urlString : String = "https://www.pdfreaderpro.com/privacy-policy"
|
|
|
+// let encodedURLString : String = urlString.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!
|
|
|
+// let linkRange = (stringValue as NSString).range(of: privacyPolicy)
|
|
|
+// attributedString.addAttribute(NSAttributedString.Key.link, value: NSURL(string: encodedURLString)!, range: linkRange)
|
|
|
+// attributedString.addAttribute(NSAttributedString.Key.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: linkRange)
|
|
|
+//
|
|
|
+// let allRange = (stringValue as NSString).range(of: stringValue)
|
|
|
+// attributedString.addAttributes([NSAttributedString.Key.foregroundColor : KMAppearance.Layout.h1Color()], range: allRange)
|
|
|
+// attributedString.addAttributes([NSAttributedString.Key.font :NSFont(name: "SFProText-Regular", size: 12.0) as Any], range: allRange)
|
|
|
|
|
|
// 设置悬停时链接文本颜色
|
|
|
// let hoverColor = NSColor.blue
|
|
@@ -366,7 +366,7 @@ import Cocoa
|
|
|
NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue
|
|
|
]
|
|
|
|
|
|
- self.bottomTextView.textStorage?.setAttributedString(attributedString)
|
|
|
+// self.bottomTextView.textStorage?.setAttributedString(attributedString)
|
|
|
self.bottomTextView.isEditable = false // TextView不可编辑
|
|
|
self.bottomTextView.isSelectable = true // TextView可选择
|
|
|
self.bottomTextView.sizeToFit()
|