Browse Source

【会员系统】UI显示问题

wangshuai 3 months ago
parent
commit
6fc22a4ccd

+ 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) // 与普通文本相同的字体