瀏覽代碼

【会员系统】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) // 与普通文本相同的字体