Browse Source

【2025】【UI】UI综合问题修正

niehaoyu 4 months ago
parent
commit
a4bd5c176e

+ 5 - 1
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Dropdown/ComponentDropdownTool/ComponentDropdownTool.swift

@@ -199,9 +199,13 @@ public class ComponentDropdownTool: ComponentBaseXibView {
             groupView = ComponentGroup.createFromNib(in: ComponentLibrary.shared.componentBundle())
         }
         var viewHeight: CGFloat = 8
+        var viewWidht: CGFloat = 20
         for item in items {
             if item.type == .normal {
+                ComponentLibrary.shared.configMenuItemComponent(properties: item)
+                
                 viewHeight += 36
+                viewWidht = max(viewWidht, item.propertyInfo.viewWidth)
             } else if item.type == .divider {
                 viewHeight += 8
             }
@@ -212,7 +216,7 @@ public class ComponentDropdownTool: ComponentBaseXibView {
         point.y -= 4
         
         groupView.groupDelegate = self
-        groupView?.frame = CGRectMake(0, 0, 232, viewHeight)
+        groupView?.frame = CGRectMake(0, 0, viewWidht, viewHeight)
         groupView.updateGroupInfo(items)
         groupView.showWithPoint(point, relativeTo: contendBox)
         

+ 11 - 3
PDF Office/KMComponentLibrary/KMComponentLibrary/View/MenuItem/ComponentMenuitemProperty.swift

@@ -155,6 +155,17 @@ extension ComponentLibrary {
             }
         }
         
+        var viewWidth = ComponentLibrary.shared.sizeOfString(properties.text , properties.propertyInfo.textFont, 500).width + 32
+        if let icon = properties.lefticon {
+            viewWidth += 24
+        }
+        if let icon = properties.righticon {
+            viewWidth += 24
+        }
+        if let string = properties.keyEquivalent {
+            viewWidth += 44
+        }
+        properties.propertyInfo.viewWidth = viewWidth
         
         //keyEquivalent_textColor
         if let value = ComponentLibrary.shared.getComponentValueFromKey("colorText/3") {
@@ -164,9 +175,6 @@ extension ComponentLibrary {
             properties.propertyInfo.color_active = NSColor.clear
         }
         
-        
-        
-        
     }
     
 }

+ 18 - 3
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelect.swift

@@ -144,8 +144,10 @@ public class ComponentSelect: ComponentBaseXibView {
         
         if properties.isDisabled == false {
             inputField.isEditable = true
+            inputField.isSelectable = true
             if properties.creatable == false {
                 inputField.isEditable = false
+                inputField.isSelectable = false
             }
         } else {
             inputField.isEditable = false
@@ -243,10 +245,15 @@ public class ComponentSelect: ComponentBaseXibView {
         var point = convert(contendBox.frame.origin, to: nil)
         point.y -= viewHeight
         
+        var viewWidth: CGFloat = 260
+        if viewWidth < CGRectGetWidth(self.frame) {
+            viewWidth = CGRectGetWidth(self.frame)
+        }
+        
         if groupView == nil {
             groupView = ComponentGroup.createFromNib(in: ComponentLibrary.shared.componentBundle())
         }
-        groupView?.frame = CGRectMake(310, 0, 260, viewHeight)
+        groupView?.frame = CGRectMake(310, 0, viewWidth, viewHeight)
         groupView?.reloadData()
         groupView.groupDelegate = self
         groupView.showWithPoint(point, relativeTo: contendBox)
@@ -338,8 +345,16 @@ public class ComponentSelect: ComponentBaseXibView {
         super.mouseUp(with: event)
         
         if properties.isDisabled == false {
-            let point = convert(event.locationInWindow, from: nil)
-            if CGRectContainsPoint(rightIconImage.frame, point) {
+            if properties.creatable == true {
+                let point = convert(event.locationInWindow, from: nil)
+                if CGRectContainsPoint(rightIconImage.frame, point) {
+                    window?.makeFirstResponder(rightIconImage)
+                    
+                    properties.state = .pressed
+                    
+                    showGroupView()
+                }
+            } else {
                 window?.makeFirstResponder(rightIconImage)
                 
                 properties.state = .pressed

+ 9 - 2
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/SelectZoom/ComponentSelectZoom.swift

@@ -164,6 +164,8 @@ public class ComponentSelectZoom: ComponentBaseXibView {
         }
         
         var viewHeight: CGFloat = 8.0
+        var viewWidht: CGFloat = 20
+
         for item in properties.menuItemArr {
             item.state = .normal
             item.itemSelected = false
@@ -171,18 +173,23 @@ public class ComponentSelectZoom: ComponentBaseXibView {
                 item.itemSelected = true
             }
             if item.type == .normal {
+                ComponentLibrary.shared.configMenuItemComponent(properties: item)
+                
                 viewHeight += 36
+                viewWidht = max(viewWidht, item.propertyInfo.viewWidth)
             } else if item.type == .divider {
                 viewHeight += 8
             }
         }
         
-        let point = convert(contendBox.frame.origin, to: nil)
+        var point = convert(contendBox.frame.origin, to: nil)
+        point.y -= viewHeight
+        point.y -= 6
          
         if groupView == nil {
             groupView = ComponentGroup.createFromNib(in: ComponentLibrary.shared.componentBundle())
         }
-        groupView?.frame = CGRectMake(310, 0, 260, viewHeight)
+        groupView?.frame = CGRectMake(310, 0, 180, viewHeight)
         groupView?.reloadData()
         groupView.groupDelegate = self
         groupView?.showWithPoint(point, relativeTo: contendBox)

+ 34 - 30
PDF Office/PDF Master/KMClass/KMHomeViewController/KMURLCreatePDFWindowController/KMURLCreatePDFWindowController.swift

@@ -11,14 +11,14 @@ import KMComponentLibrary
 let kUrlToPDFFolderPath = (try? FileManager.default.url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: true).appendingPathComponent(Bundle.main.bundleIdentifier ?? "").appendingPathComponent("WebPage"))?.path ?? ""
 
 @objc protocol KMURLCreatePDFWindowControllerDelegate: AnyObject {
-     
+    
     //选择打开文件
     @objc optional func urlCreateWCDidChooseFileToOpen(_ vc: KMURLCreatePDFWindowController, _ fileURL: URL)
- 
+    
 }
 
 class KMURLCreatePDFWindowController: NSWindowController {
-
+    
     @IBOutlet var contendBox: NSBox!
     
     @IBOutlet var titleLabel: NSTextField!
@@ -44,12 +44,12 @@ class KMURLCreatePDFWindowController: NSWindowController {
     
     var choosedFilePath: String?
     var filePath: String?
-
+    
     weak open var delegate: KMURLCreatePDFWindowControllerDelegate?
-
+    
     override func windowDidLoad() {
         super.windowDidLoad()
-
+        
         // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
         
         setUpProperty()
@@ -82,9 +82,9 @@ class KMURLCreatePDFWindowController: NSWindowController {
         urlRadio.setTarget(self, action: #selector(typeRadioChanged(_:)))
         
         fileRadio.properties = ComponentCheckBoxProperty(size: .s,
-                                                        state: .normal,
-                                                        text: NSLocalizedString("File", comment: ""),
-                                                        checkboxType: .normal)
+                                                         state: .normal,
+                                                         text: NSLocalizedString("File", comment: ""),
+                                                         checkboxType: .normal)
         fileRadio.setTarget(self, action: #selector(typeRadioChanged(_:)))
         
         inputView.properties = ComponentInputProperty(size: .s,
@@ -111,7 +111,7 @@ class KMURLCreatePDFWindowController: NSWindowController {
                                                                 iconImage: NSImage(named: "file_icon"))
         fileInputAddon.setTarget(self, action: #selector(chooseURLAction(_ :)))
         
-  
+        
         cancelButton.properties = ComponentButtonProperty(type: .default_tertiary,
                                                           size: .s,
                                                           state: .normal,
@@ -119,9 +119,9 @@ class KMURLCreatePDFWindowController: NSWindowController {
         cancelButton.setTarget(self, action: #selector(cancelButtonClicked(_ :)))
         
         openButton.properties = ComponentButtonProperty(type: .primary,
-                                                          size: .s,
-                                                          state: .normal,
-                                                          buttonText: NSLocalizedString("Open", comment: ""))
+                                                        size: .s,
+                                                        state: .normal,
+                                                        buttonText: NSLocalizedString("Open", comment: ""))
         openButton.setTarget(self, action: #selector(openButtonClicked(_ :)))
         
     }
@@ -132,7 +132,7 @@ class KMURLCreatePDFWindowController: NSWindowController {
         
         fileInputBGView.isHidden = isFromURL ? true : false
         inputView.isHidden = isFromURL ? false : true
-         
+        
         cancelButton.properties.state = .normal
         openButton.properties.state = .normal
         
@@ -165,11 +165,11 @@ class KMURLCreatePDFWindowController: NSWindowController {
         urlRadio.reloadData()
         
         fileRadio.reloadData()
-         
+        
         cancelButton.reloadData()
         
         openButton.reloadData()
-    
+        
         fileInputView.reloadData()
         
     }
@@ -187,7 +187,9 @@ class KMURLCreatePDFWindowController: NSWindowController {
         
         choosedFilePath = nil
         inputView.properties.text = ""
-             
+        
+        hideWaitting()
+        
         reloadData()
         
         KMURLToPDF.shareInstance.stopLoading()
@@ -207,13 +209,13 @@ class KMURLCreatePDFWindowController: NSWindowController {
         openPanel.allowedFileTypes = ["html", "HTML"]
         openPanel.allowsMultipleSelection = false
         openPanel.beginSheetModal(for: self.window!) { [weak self] result in
-             if result == NSApplication.ModalResponse.OK {
-                 if let url = openPanel.url {
-                     self?.choosedFilePath = url.path
-                     
-                     self?.reloadData()
-                     
-                 }
+            if result == NSApplication.ModalResponse.OK {
+                if let url = openPanel.url {
+                    self?.choosedFilePath = url.path
+                    
+                    self?.reloadData()
+                    
+                }
             }
         }
     }
@@ -239,7 +241,7 @@ class KMURLCreatePDFWindowController: NSWindowController {
                 url = URL(fileURLWithPath: choosedFilePath)
             }
         }
-
+        
         if let url = url {
             showWaitting()
             
@@ -264,7 +266,7 @@ class KMURLCreatePDFWindowController: NSWindowController {
                             alert.alertStyle = .critical
                             alert.messageText = NSLocalizedString("Conversion Failed", comment: "")
                             alert.beginSheetModal(for: window) { [weak self] result in
-                                 
+                                
                             }
                         }
                     }
@@ -290,7 +292,7 @@ class KMURLCreatePDFWindowController: NSWindowController {
                             alert.alertStyle = .critical
                             alert.messageText = NSLocalizedString("Conversion Failed", comment: "")
                             alert.beginSheetModal(for: window) { [weak self] result in
-                                 
+                                
                             }
                         }
                     }
@@ -307,7 +309,7 @@ class KMURLCreatePDFWindowController: NSWindowController {
         }
         contendBox.contentView?.addSubview(posterMaskView!, positioned: .below, relativeTo: self.cancelButton)
     }
-
+    
     func hideWaitting() {
         posterMaskView?.removeFromSuperview()
     }
@@ -324,7 +326,9 @@ class KMURLCreatePDFWindowController: NSWindowController {
             
             choosedFilePath = nil
             self.handler = handler
-         
+            
+            hideWaitting()
+            
             reloadData()
         }
         
@@ -358,7 +362,7 @@ class KMURLCreatePDFWindowController: NSWindowController {
         let urlTest = NSPredicate(format: "SELF MATCHES %@", urlRegex)
         return urlTest.evaluate(with: url)
     }
- 
+    
     func urlValueEncode(_ str: String) -> String? {
         let allowedCharacterSet = CharacterSet(charactersIn: "!*'();:@&=+$,?%#[]{}").inverted
         return str.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet)

+ 1 - 1
PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeRightView/HistoryFilesItems/KMHistoryFileListItem.swift

@@ -54,7 +54,7 @@ public class KMHistoryFileListItem: NSCollectionViewItem {
         
         updateTrackingAreas()
         
-        moreButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true)
+        moreButton.properties = ComponentButtonProperty(type: .text_gray, size: .s, onlyIcon: true, keepPressState: false)
         moreButton.properties.propertyInfo.leftIcon_nor = NSImage(named: "filelist_more")
         moreButton.reloadData()
         moreButton.setTarget(self, action: #selector(morebuttonClicked(_:)))

+ 17 - 17
PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeRightView/KMHomeRightView.swift

@@ -419,26 +419,26 @@ extension KMHomeRightView: KMHomeFilesHeaderViewDelegate {
         }
         let alert = NSAlert()
         alert.alertStyle = .informational
-        alert.informativeText = NSLocalizedString("Remove Selected Files from your Recent Files?", comment: "")
-        alert.messageText = NSLocalizedString("The file will disappear from the recent list.", comment: "")
-        alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
-        alert.addButton(withTitle: NSLocalizedString("Delete", comment: ""))
+        alert.informativeText = KMLocalizedString("Remove Selected Files from your Recent Files?")
+        alert.messageText = KMLocalizedString("The file will disappear from the recent list.")
+        alert.addButton(withTitle: KMLocalizedString("Delete"))
+        alert.addButton(withTitle: KMLocalizedString("Cancel"))
         alert.showsSuppressionButton = true
         let response = alert.runModal()
         if response.rawValue == 1001 {
-            var selects: [URL] = []
-            if HistoryFilesManager.manager.selectFiles.count > 0 {
-                for selecturl in HistoryFilesManager.manager.selectFiles {
-                    selects.append(selecturl)
-                }
-            }
-            HistoryFilesManager.manager.historyFileDeleteAction(selects)
-            self.reloadData()
-            
-            if alert.suppressionButton?.state == .on {
-                UserDefaults.standard.set("YES", forKey: "HomeFilesDeleteConfirmKey")
-                UserDefaults.standard.synchronize()
-            }
+//            var selects: [URL] = []
+//            if HistoryFilesManager.manager.selectFiles.count > 0 {
+//                for selecturl in HistoryFilesManager.manager.selectFiles {
+//                    selects.append(selecturl)
+//                }
+//            }
+//            HistoryFilesManager.manager.historyFileDeleteAction(selects)
+//            self.reloadData()
+//            
+//            if alert.suppressionButton?.state == .on {
+//                UserDefaults.standard.set("YES", forKey: "HomeFilesDeleteConfirmKey")
+//                UserDefaults.standard.synchronize()
+//            }
         }
         
     }

+ 19 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -1141,6 +1141,7 @@ extension KMMainViewController: KMPDFToolbarControllerDelegate {
         
         print("toolbar点击", itemIdentifier)
         if itemIdentifier == KMPDFToolbar_ViewDisplay_Identifier {
+            //Display
             updatePDFDisplaySettingView()
         } else if itemIdentifier == KMPDFToolbar_PageEdit_Identifier {
             if viewManager.isPageEditMode == true {
@@ -1148,6 +1149,20 @@ extension KMMainViewController: KMPDFToolbarControllerDelegate {
             } else {
                 exitPageEditMode()
             }
+        } else if itemIdentifier == KMPDFToolbar_Markup_Identifier {
+            
+        } else if itemIdentifier == KMPDFToolbar_Edit_Identifier {
+            
+        } else if itemIdentifier == KMPDFToolbar_Form_Identifier {
+            
+        } else if itemIdentifier == KMPDFToolbar_Fill_Identifier {
+            
+        } else if itemIdentifier == KMPDFToolbar_Convert_Identifier {
+            
+        } else if itemIdentifier == KMPDFToolbar_Protect_Identifier {
+            
+        } else if itemIdentifier == KMPDFToolbar_Tools_Identifier {
+           
         } else if itemIdentifier == KMPDFToolbar_convert_word_Identifier {
             let winC = KMConvertWordWindowController()
             let model = KMDocumentModel(url: listView.document.documentURL)
@@ -1335,6 +1350,10 @@ extension KMMainViewController: KMPDFToolbarControllerDelegate {
     func kmPDFToolbarControllerDidSelectTextDidEndEditing(_ controller: KMPDFToolbarController, _ view: ComponentSelect) {
         
     }
+    
+    func kmPDFToolbarControllerDidExitPageEditMode(_ controller: KMPDFToolbarController) {
+        exitPageEditMode()
+    }
 }
 
 

+ 27 - 8
PDF Office/PDF Master/KMClass/KMPDFViewController/KMNDisplayViewController/KMNDisplayViewController.swift

@@ -102,9 +102,16 @@ class KMNDisplayViewController: NSViewController {
                 scrollViewHeightConst.constant = min(boxHeightConst.constant+5, self.view.frame.size.height)
             }
         }
+        
+        if view.window?.styleMask.contains(.fullScreen) == true {
+            fullScreenSelector.properties.state = .pressed
+        } else {
+            fullScreenSelector.properties.state = .normal
+        }
+        fullScreenSelector.reloadData()
+        
     }
     
-    
     override func viewDidLoad() {
         super.viewDidLoad()
         // Do view setup here.
@@ -296,7 +303,7 @@ class KMNDisplayViewController: NSViewController {
             let softColor = NSColor(deviceRed: 238.0/255.0, green: 232.0/255.0, blue: 216.0/255.0, alpha: 1.0)
             let nightColor = NSColor.black
             let greenColor = NSColor(deviceRed: 153.0/255.0, green: 207.0/255.0, blue: 161.0/255.0, alpha: 1.0)
-            themesArray = [normalColor, softColor, nightColor, greenColor]
+            themesArray = [normalColor, softColor, greenColor, nightColor]
         }
         setUpThemesItems()
         
@@ -336,10 +343,10 @@ class KMNDisplayViewController: NSViewController {
             scrollViewHeightConst.constant = min(boxHeightConst.constant, self.view.frame.size.height)
         } else {
             if let url = viewManager?.splitPDFFileURL {
-                boxHeightConst.constant = 614
+                boxHeightConst.constant = 658 + 12
                 scrollViewHeightConst.constant = min(boxHeightConst.constant, self.view.frame.size.height)
             } else {
-                boxHeightConst.constant = 658
+                boxHeightConst.constant = 614 + 12
                 scrollViewHeightConst.constant = min(boxHeightConst.constant, self.view.frame.size.height)
             }
         }
@@ -484,10 +491,15 @@ class KMNDisplayViewController: NSViewController {
             delegate?.displayViewControllerDidReadModeUpdated?(self)
             
         } else if sender == fullScreenSelector {
-            fullScreenSelector.properties.state = .normal
-            
             view.window?.toggleFullScreen(nil)
             
+            if view.window?.styleMask.contains(.fullScreen) == true {
+                fullScreenSelector.properties.state = .pressed
+            } else {
+                fullScreenSelector.properties.state = .normal
+            }
+            fullScreenSelector.reloadData()
+            
         } else if sender == slideShowSelector {
             slideShowSelector.properties.state = .normal
             
@@ -680,13 +692,20 @@ extension KMNDisplayViewController: ComponentCColorDelegate {
             }
         }
         
-        
         let subviews = themesContendView.subviews
         let index = subviews.firstIndex(of: view) ?? 0
         
         var model: KMPDFViewMode = .normal
         if index <= 3 {
-            model = KMPDFViewMode(rawValue: UInt(index)) ?? .normal
+            if index == 0 {
+                model = .normal
+            } else if index == 1 {
+                model = .soft
+            } else if index == 2 {
+                model = .green
+            } else if index == 3 {
+                model = .night
+            }
         } else {
             model = .other
         }

+ 33 - 2
PDF Office/PDF Master/KMClass/KMPDFViewController/Toolbar/KMPDFToolbarController.swift

@@ -12,6 +12,9 @@ import KMComponentLibrary
     
     @objc optional func kmPDFToolbarControllerDidToolbarItemClicked(_ controller: KMPDFToolbarController, _ itemIdentifier: String)
     
+    //结束页面编辑
+    @objc optional func kmPDFToolbarControllerDidExitPageEditMode(_ controller: KMPDFToolbarController)
+    
     @objc optional func kmPDFToolbarControllerDidSelectTextDidBeginEditing(_ controller: KMPDFToolbarController, _ view: ComponentSelect)
  
     @objc optional func kmPDFToolbarControllerDidSelectTextDidChange(_ controller: KMPDFToolbarController, _ view: ComponentSelect)
@@ -477,6 +480,24 @@ class KMPDFToolbarController: NSViewController {
     //MARK: - 刷新tools工具
     func reloadToolsView() {
         toolbarManager?.reloadToolsData()
+
+        toolbarManager?.tools_selectProperty.itemSelected = false
+        toolbarManager?.tools_scrollProperty.itemSelected = false
+        toolbarManager?.tools_contentProperty.itemSelected = false
+        toolbarManager?.tools_magnifyProperty.itemSelected = false
+        toolbarManager?.tools_areaProperty.itemSelected = false
+
+        if viewManager?.viewToolsType == .Select {
+            toolbarManager?.tools_selectProperty.itemSelected = true
+        } else if viewManager?.viewToolsType == .Scroll {
+            toolbarManager?.tools_scrollProperty.itemSelected = true
+        } else if viewManager?.viewToolsType == .Content_Selection {
+            toolbarManager?.tools_contentProperty.itemSelected = true
+        } else if viewManager?.viewToolsType == .Magnify {
+            toolbarManager?.tools_magnifyProperty.itemSelected = true
+        } else if viewManager?.viewToolsType == .AreaZoom {
+            toolbarManager?.tools_areaProperty.itemSelected = true
+        }
         
         toolsView.reloadData()
     }
@@ -786,7 +807,12 @@ extension KMPDFToolbarController: ComponentTabsDelegate {
         }
         
         _manager.viewToolsType = .Select
-        _manager.isPageEditMode = false
+        
+        if _manager.isPageEditMode == true {
+            delegate?.kmPDFToolbarControllerDidExitPageEditMode?(self)
+            
+            _manager.isPageEditMode = false
+        }
         
         if property == toolbarManager.markupMode_Property {
             if _manager.toolMode == .Markup {
@@ -945,7 +971,12 @@ extension KMPDFToolbarController: ComponentGroupDelegate {
             
         } else if moreTabsItems.contains(property) {
             viewManager.viewToolsType = .Select
-            viewManager.isPageEditMode = false
+            
+            if viewManager.isPageEditMode == true {
+                delegate?.kmPDFToolbarControllerDidExitPageEditMode?(self)
+                viewManager.isPageEditMode = false
+            }
+            
             if property == markup_Menuitem_Property {
                 viewManager.toolMode = .Markup
             } else if property == edit_Menuitem_Property {

+ 9 - 9
PDF Office/PDF Master/KMClass/KMPDFViewController/Toolbar/KMPDFToolbarController.xib

@@ -75,18 +75,18 @@
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="IlW-fu-gVn">
                                         <rect key="frame" x="12" y="0.0" width="264" height="40"/>
                                         <subviews>
-                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="mWq-6Q-Jeb" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="kZ4-rC-iP5" customClass="ComponentButton" customModule="KMComponentLibrary">
                                                 <rect key="frame" x="0.0" y="6" width="28" height="28"/>
                                                 <constraints>
-                                                    <constraint firstAttribute="height" constant="28" id="c2o-rc-JBl"/>
-                                                    <constraint firstAttribute="width" constant="28" id="fqq-1y-X82"/>
+                                                    <constraint firstAttribute="width" constant="28" id="oKu-vQ-NUd"/>
+                                                    <constraint firstAttribute="height" constant="28" id="u71-Rg-DQa"/>
                                                 </constraints>
                                             </customView>
-                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="kZ4-rC-iP5" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="mWq-6Q-Jeb" customClass="ComponentButton" customModule="KMComponentLibrary">
                                                 <rect key="frame" x="36" y="6" width="28" height="28"/>
                                                 <constraints>
-                                                    <constraint firstAttribute="width" constant="28" id="oKu-vQ-NUd"/>
-                                                    <constraint firstAttribute="height" constant="28" id="u71-Rg-DQa"/>
+                                                    <constraint firstAttribute="height" constant="28" id="c2o-rc-JBl"/>
+                                                    <constraint firstAttribute="width" constant="28" id="fqq-1y-X82"/>
                                                 </constraints>
                                             </customView>
                                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="Jlg-Qt-Zb3" customClass="ComponentDropdownTool" customModule="KMComponentLibrary">
@@ -116,12 +116,12 @@
                                             <constraint firstItem="mWq-6Q-Jeb" firstAttribute="centerY" secondItem="IlW-fu-gVn" secondAttribute="centerY" id="8dG-QJ-xy4"/>
                                             <constraint firstItem="sWP-oz-Pbl" firstAttribute="centerY" secondItem="IlW-fu-gVn" secondAttribute="centerY" id="FrC-25-oSX"/>
                                             <constraint firstAttribute="height" constant="40" id="IUu-0h-Gad"/>
-                                            <constraint firstItem="Jlg-Qt-Zb3" firstAttribute="leading" secondItem="kZ4-rC-iP5" secondAttribute="trailing" constant="8" id="KA5-am-mqk"/>
+                                            <constraint firstItem="kZ4-rC-iP5" firstAttribute="leading" secondItem="IlW-fu-gVn" secondAttribute="leading" id="LyC-Ub-SeS"/>
+                                            <constraint firstItem="mWq-6Q-Jeb" firstAttribute="leading" secondItem="kZ4-rC-iP5" secondAttribute="trailing" constant="8" id="Nb6-8P-baZ"/>
                                             <constraint firstAttribute="width" constant="264" id="PRQ-O2-HVW"/>
                                             <constraint firstItem="4K3-lv-es0" firstAttribute="centerY" secondItem="IlW-fu-gVn" secondAttribute="centerY" id="UMg-rH-g7f"/>
-                                            <constraint firstItem="kZ4-rC-iP5" firstAttribute="leading" secondItem="mWq-6Q-Jeb" secondAttribute="trailing" constant="8" id="b95-vX-N7Q"/>
                                             <constraint firstItem="4K3-lv-es0" firstAttribute="leading" secondItem="Jlg-Qt-Zb3" secondAttribute="trailing" constant="7" id="bSm-o9-u3r"/>
-                                            <constraint firstItem="mWq-6Q-Jeb" firstAttribute="leading" secondItem="IlW-fu-gVn" secondAttribute="leading" id="npK-Ol-92J"/>
+                                            <constraint firstItem="Jlg-Qt-Zb3" firstAttribute="leading" secondItem="mWq-6Q-Jeb" secondAttribute="trailing" constant="8" id="eXb-j6-aUM"/>
                                             <constraint firstItem="Jlg-Qt-Zb3" firstAttribute="centerY" secondItem="IlW-fu-gVn" secondAttribute="centerY" id="rMB-yg-6Ww"/>
                                             <constraint firstItem="kZ4-rC-iP5" firstAttribute="centerY" secondItem="IlW-fu-gVn" secondAttribute="centerY" id="zH8-J4-efl"/>
                                         </constraints>

+ 7 - 7
PDF Office/PDF Master/KMClass/KMPDFViewController/Toolbar/Model/KMPDFToolbarManager.swift

@@ -49,11 +49,11 @@ class KMPDFToolbarManager: NSObject {
  
     //MARK: -ToosView
     var toolsProperty: ComponentDropdownToolProperty = ComponentDropdownToolProperty(state: .normal, leftIcon: NSImage(named: "toolbar_Tools_select"), showDropdown: true)
-    var tools_selectProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, lefticon: NSImage(named: "toolbar_Tools_select"), keyEquivalent: KMLocalizedString("1"), text: KMLocalizedString("Select"), identifier: KMPDFToolbar_View_Select_Identifier)
-     var tools_scrollProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, lefticon: NSImage(named: "toolbar_Tools_scroll"), keyEquivalent: KMLocalizedString("2"), text: KMLocalizedString("Scroll"), identifier: KMPDFToolbar_View_Scroll_Identifier)
-     var tools_contentProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, lefticon: NSImage(named: "toolbar_Tools_content"), keyEquivalent: KMLocalizedString("3"), text: KMLocalizedString("Content Selection"), identifier: KMPDFToolbar_View_ContentSelection_Identifier)
-     var tools_magnifyProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, lefticon: NSImage(named: "toolbar_Tools_magnify"), keyEquivalent: KMLocalizedString("4"), text: KMLocalizedString("Magnify"), identifier: KMPDFToolbar_View_Magnify_Identifier)
-     var tools_areaProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, lefticon: NSImage(named: "toolbar_Tools_zoom"), keyEquivalent: KMLocalizedString("5"), text: KMLocalizedString("Area Zoom"), identifier: KMPDFToolbar_View_AreaZoom_Identifier)
+    var tools_selectProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, lefticon: NSImage(named: "toolbar_Tools_select"), keyEquivalent: KMLocalizedString("1"), text: KMLocalizedString("Select"), identifier: KMPDFToolbar_View_Select_Identifier)
+     var tools_scrollProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, lefticon: NSImage(named: "toolbar_Tools_scroll"), keyEquivalent: KMLocalizedString("2"), text: KMLocalizedString("Scroll"), identifier: KMPDFToolbar_View_Scroll_Identifier)
+     var tools_contentProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, lefticon: NSImage(named: "toolbar_Tools_content"), keyEquivalent: KMLocalizedString("3"), text: KMLocalizedString("Content Selection"), identifier: KMPDFToolbar_View_ContentSelection_Identifier)
+     var tools_magnifyProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, lefticon: NSImage(named: "toolbar_Tools_magnify"), keyEquivalent: KMLocalizedString("4"), text: KMLocalizedString("Magnify"), identifier: KMPDFToolbar_View_Magnify_Identifier)
+     var tools_areaProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false, itemSelected: false, isDisabled: false, lefticon: NSImage(named: "toolbar_Tools_zoom"), keyEquivalent: KMLocalizedString("5"), text: KMLocalizedString("Area Zoom"), identifier: KMPDFToolbar_View_AreaZoom_Identifier)
     
     //MARK: -缩放比例
     var selectZoomProperty: ComponentSelectZoomProperty = ComponentSelectZoomProperty(state: .normal, isDisabled: false, text: "100%", leftIcon_nor: NSImage(named: "toolbar_minus"), leftIcon_dis: NSImage(named: "toolbar_minus_dis"), dropdownIcon: NSImage(named: "toolbar_zoom_dropdown"), rightIcon_nor: NSImage(named: "toolbar_plus"), rightIcon_dis: NSImage(named: "toolbar_plus_dis"))
@@ -206,9 +206,9 @@ class KMPDFToolbarManager: NSObject {
     }
     
     func initData() {
-        viewProperty.propertyInfo.leftIcon_nor = NSImage(named: "toolbar_View")
+        viewProperty.icon = NSImage(named: "toolbar_View")
         
-        pageProperty.propertyInfo.leftIcon_nor = NSImage(named: "toolbar_Page")
+        pageProperty.icon = NSImage(named: "toolbar_Page")
         
         reloadToolsData()
         var menuItemArr: [ComponentMenuitemProperty] = []

+ 79 - 16
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -1037,22 +1037,6 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "797554A7-56F5-476A-B8A7-25F55B22CD8F"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/KMClass/KMHomeViewController/KMURLCreatePDFWindowController/KMURLCreatePDFWindowController.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "369"
-            endingLineNumber = "369"
-            landmarkName = "mouseDown(with:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -2836,5 +2820,84 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "E17A09E8-E03E-48E6-A22C-5D40C979CFA9"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/KMNDisplayViewController/KMNDisplayViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "554"
+            endingLineNumber = "554"
+            landmarkName = "themeAddButtonClicked(_:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "E17A09E8-E03E-48E6-A22C-5D40C979CFA9 - d2c58f469d5739ba"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMNDisplayViewController.themeAddButtonClicked(KMComponentLibrary.ComponentButton) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMNDisplayViewController/KMNDisplayViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "556"
+                  endingLineNumber = "556"
+                  offsetFromSymbolStart = "964">
+               </Location>
+               <Location
+                  uuid = "E17A09E8-E03E-48E6-A22C-5D40C979CFA9 - d2c58f469d5739f8"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMNDisplayViewController.themeAddButtonClicked(KMComponentLibrary.ComponentButton) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMNDisplayViewController/KMNDisplayViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "554"
+                  endingLineNumber = "554"
+                  offsetFromSymbolStart = "136">
+               </Location>
+               <Location
+                  uuid = "E17A09E8-E03E-48E6-A22C-5D40C979CFA9 - d2c58f469d5739f8"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMNDisplayViewController.themeAddButtonClicked(KMComponentLibrary.ComponentButton) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMNDisplayViewController/KMNDisplayViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "554"
+                  endingLineNumber = "554"
+                  offsetFromSymbolStart = "148">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "5E9BE65A-59E3-44E8-8BE3-F3BBFBC0342E"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "523"
+            endingLineNumber = "523"
+            landmarkName = "openPDFReadMode()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>