Browse Source

【综合】Toolbar,工具栏工具选项,没有对齐(已修复)

tangchao 1 năm trước cách đây
mục cha
commit
f99ad952f2

+ 8 - 8
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarView.swift

@@ -426,30 +426,30 @@ private let KMToolbarItemSpace = 8.0
                 if (lastItem != nil) {
                     if (i == itemIdentifiers.count - 1) {
                         item?.mas_makeConstraints({ make in
-                            make?.height.offset()(44)
-                            make?.bottom.equalTo()(0)
+                            make?.height.offset()(40)
+                            make?.centerY.mas_equalTo()(0)
                             make?.left.equalTo()(lastItem!.mas_right)?.offset()(KMToolbarItemSpace)
                             make?.right.equalTo()(self.rightView.mas_right)?.offset()(-KMToolbarItemSpace)
                         })
                     } else {
                         item?.mas_makeConstraints({ make in
-                            make?.height.offset()(44)
-                            make?.bottom.equalTo()(0)
+                            make?.height.offset()(40)
+                            make?.centerY.mas_equalTo()(0)
                             make?.left.equalTo()(lastItem!.mas_right)?.offset()(KMToolbarItemSpace)
                         })
                     }
                 } else {
                     if (i == itemIdentifiers.count - 1) {
                         item?.mas_makeConstraints({ make in
-                            make?.bottom.equalTo()(0)
-                            make?.height.offset()(44)
+                            make?.centerY.mas_equalTo()(0)
+                            make?.height.offset()(40)
                             make?.left.equalTo()(self.rightView.mas_left)?.offset()(KMToolbarItemSpace)
                             make?.right.equalTo()(self.rightView.mas_right)?.offset()(-KMToolbarItemSpace)
                         })
                     } else {
                         item?.mas_makeConstraints({ make in
-                            make?.height.offset()(44)
-                            make?.bottom.equalTo()(0)
+                            make?.height.offset()(40)
+                            make?.centerY.mas_equalTo()(0)
                             make?.left.equalTo()(0)
                         })
                     }

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/View/KMToolbarZoomItemView.swift

@@ -20,7 +20,7 @@ class KMToolbarZoomItemView: NSView {
         let label = NSTextField(labelWithString: NSLocalizedString("Zoom", comment: ""))
         label.frame = NSMakeRect(0, 0, 70, 16)
         label.alignment = .right
-        label.font = .systemFont(ofSize: 11)
+        label.font = KMToolbarMainItemView.textFont
         label.textColor = KMAppearance.subtitleColor()
         return label
     }()