Преглед на файлове

【会员系统】UI显示问题

wangshuai преди 3 месеца
родител
ревизия
6fc22a4ccd
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseEmbeddedWindowController.swift

+ 3 - 1
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseEmbeddedWindowController.swift

@@ -1319,7 +1319,9 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
         let enterpriseStr = NSLocalizedString("enterprise version", tableName: "MemberCenterLocalizable", comment: "")
         let fireFullString = String(format: firmString, enterpriseStr)
         let firmLinkColor = NSColor(named: "4982E6") ?? NSColor.blue
-        let attri = NSMutableAttributedString(string: fireFullString, attributes: [.foregroundColor : firmLinkColor, .font : NSFont.SFProTextRegularFont(14.0)])
+        let paragraphStyle = NSMutableParagraphStyle()
+        paragraphStyle.alignment = .right // 设置为右对齐
+        let attri = NSMutableAttributedString(string: fireFullString, attributes: [.foregroundColor : firmLinkColor, .font : NSFont.SFProTextRegularFont(14.0),.paragraphStyle:paragraphStyle,])
         // 定义链接的范围
         let enterpriseRange = (fireFullString as NSString).range(of: enterpriseStr)
         let firmFont = NSFont.SFProTextRegularFont(14.0) // 与普通文本相同的字体