Kaynağa Gözat

【综合】解决冲突

tangchao 4 ay önce
ebeveyn
işleme
1279a6f7ba
100 değiştirilmiş dosya ile 827 ekleme ve 964 silme
  1. 4 0
      PDF Office/KMComponentLibrary/KMComponentLibrary.xcodeproj/project.pbxproj
  2. 45 0
      PDF Office/KMComponentLibrary/KMComponentLibrary/ComponentManager.swift
  3. 2 2
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Button/ComponentButton.swift
  4. 46 49
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Card/ComponentCardFile/ComponentCardFile.swift
  5. 4 4
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Card/ComponentCardFile/ComponentCardFile.xib
  6. 53 60
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Card/ComponentCardPDFTool/ComponentCardPDFTool.swift
  7. 10 18
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Card/ComponentCardPDFTool/ComponentCardPDFTool.xib
  8. 2 0
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/CheckBox/ComponentCheckBox.swift
  9. 28 22
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/ComponentBaseXibView.swift
  10. 58 121
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/GroupItem/ComponentGroup.swift
  11. 1 1
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Input/ComponentInput/ComponentInput.xib
  12. 15 0
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Message/ComponentMessage.swift
  13. 1 1
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Pagination/ComponentPagination.swift
  14. 25 23
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelect.swift
  15. 2 0
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelectProperty.swift
  16. 3 1
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/SelectZoom/ComponentSelectZoom.swift
  17. 71 73
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/ToolTips/ComponentToolTip.swift
  18. 1 1
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/ToolTips/ComponentToolTip.xib
  19. 7 1
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/ToolTips/ComponentToolTipProperty.swift
  20. 4 4
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/ToolTips/ComponentToolTipsHelp.swift
  21. 5 5
      PDF Office/PDF Master/AppDelegate.swift
  22. 1 1
      PDF Office/PDF Master/Class/AIInfo/AIConfigWindowController/AINewConfigWindowController.xib
  23. BIN
      PDF Office/PDF Master/Class/Appearance/black_pdfreaderpro_home_en.pdf
  24. 85 85
      PDF Office/PDF Master/Class/ChromiumTabs/KMBrowser.swift
  25. 1 1
      PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindow.swift
  26. 41 41
      PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindowController+Actions.swift
  27. 4 1
      PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindowController.swift
  28. 6 4
      PDF Office/PDF Master/Class/ChromiumTabs/src/Tab Strip/CTTabStripModel.m
  29. 1 79
      PDF Office/PDF Master/Class/Common/Category/NSWindowController+KMExtension.swift
  30. 4 4
      PDF Office/PDF Master/Class/Common/OC/Property/KMInfoWindowController.swift
  31. 124 117
      PDF Office/PDF Master/Class/Document/KMMainDocument.swift
  32. 14 13
      PDF Office/PDF Master/Class/Home/ViewController/customViewController/KMDesignButton.xib
  33. 7 6
      PDF Office/PDF Master/Class/Home/ViewController/customViewController/KMDesignSelect.xib
  34. 11 11
      PDF Office/PDF Master/Class/Home/ViewController/customViewController/KMNotificationVC.xib
  35. 0 0
      PDF Office/PDF Master/Class/KMDeviceBrowserWindowController/KMDeviceBrowserWindowController.swift
  36. 0 0
      PDF Office/PDF Master/Class/KMDeviceBrowserWindowController/KMDeviceBrowserWindowController.xib
  37. 0 4
      PDF Office/PDF Master/Class/KMLightMember/Controller/AccountInfo/View/KMAccountInfoView.swift
  38. 0 3
      PDF Office/PDF Master/Class/KMLightMember/Controller/Cancellation/View/KMCancellationSuccessView.swift
  39. 0 4
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/KMComparativeOutlineView.swift
  40. 0 1
      PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/KMComparativeView.swift
  41. 0 4
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginInputPasswordView.swift
  42. 0 1
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginLeftImageView.swift
  43. 0 3
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterSuccessView.swift
  44. 0 3
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterView.swift
  45. 6 10
      PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMResetPasswordView.swift
  46. 2 4
      PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMLightMemberAlertView.swift
  47. 0 3
      PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMVerificationCodeView.swift
  48. 1 15
      PDF Office/PDF Master/Class/KMLightMember/Tools/Alert/KMPurchaseAlertView.swift
  49. 1 1
      PDF Office/PDF Master/Class/PDFTools/AutoFlow/KMAutoFlowOptionsSheetController.xib
  50. 1 1
      PDF Office/PDF Master/Class/PDFTools/Compare/ViewController/ContentComplete/KMCompareContentWindowController.xib
  51. 1 1
      PDF Office/PDF Master/Class/PDFTools/KMBookmark/Model/KMBookmark.swift
  52. 72 72
      PDF Office/PDF Master/Class/PDFTools/Measure/Side/KMMeasureSideVC.xib
  53. 11 11
      PDF Office/PDF Master/Class/PDFTools/Merge/OCPart/KMPDFEditAppendWindow.m
  54. 2 2
      PDF Office/PDF Master/Class/PDFTools/PageEdit/View/KMPageEditThumbnailItem.xib
  55. 2 4
      PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/KMPrintChooseView.swift
  56. 2 3
      PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/View/KMPrintChoosePageSizeView.swift
  57. 1 3
      PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/View/View/DealPaper/KMPrintChoosePageSizeMultipageView.swift
  58. 0 2
      PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/View/View/DealPaper/KMPrintChoosePageSizePosterView.swift
  59. 0 2
      PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/View/View/DealPaper/View/KMPrintDuplexPrintingSetView.swift
  60. 0 2
      PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/View/View/PaperSet/View/KMPrintPaperSetView.swift
  61. 0 2
      PDF Office/PDF Master/Class/PDFTools/Print/View/Preview/KMPrintPreviewView.swift
  62. 4 4
      PDF Office/PDF Master/Class/PDFTools/Snapshot/Window/SnapshotWindow.xib
  63. 2 4
      PDF Office/PDF Master/Class/PDFTools/Tools/KMImageTitleButton/KMImageTitleButton.swift
  64. 0 2
      PDF Office/PDF Master/Class/PDFTools/Tools/KMTextFieldStepperView/KMTextFieldStepperView.swift
  65. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/Form/KMFormListMenuPopWindowController.xib
  66. 29 29
      PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/KMPresentationTopViewController.xib
  67. 2 13
      PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/MainWindowController.xib
  68. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/SKPresentationOptionsSheetController.swift
  69. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/Contents.json
  70. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsBottomMid.imageset/Contents.json
  71. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsBottomMid.imageset/South.pdf
  72. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDate.imageset/Contents.json
  73. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDate.imageset/ic_cursors_date-1.pdf
  74. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDragMove.imageset/Contents.json
  75. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDragMove.imageset/Move.pdf
  76. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFork.imageset/Contents.json
  77. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFork.imageset/ic_cursors_fork-1.pdf
  78. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFormLine.imageset/Contents.json
  79. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFormLine.imageset/ic_cursors_line-1.pdf
  80. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFreehand.imageset/Contents.json
  81. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFreehand.imageset/light_ic_cursors_freehand-1.pdf
  82. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFreehand.imageset/light_ic_cursors_freehand.pdf
  83. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsHighlight.imageset/Contents.json
  84. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsHighlight.imageset/light_ic_cursors_highlight-1.pdf
  85. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsHighlight.imageset/light_ic_cursors_highlight.pdf
  86. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMax.imageset/Contents.json
  87. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMax.imageset/North West.pdf
  88. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMid.imageset/Contents.json
  89. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMid.imageset/West.pdf
  90. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMin.imageset/Contents.json
  91. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMin.imageset/South West.pdf
  92. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLine.imageset/Contents.json
  93. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLine.imageset/light_ic_cursors_line (1).pdf
  94. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLine.imageset/light_ic_cursors_line.pdf
  95. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLink.imageset/Contents.json
  96. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLink.imageset/light_ic_cursors_link (1).pdf
  97. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLink.imageset/light_ic_cursors_link.pdf
  98. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLinkDestination.imageset/Contents.json
  99. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLinkDestination.imageset/Screenshot select.pdf
  100. 0 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsNote.imageset/Contents.json

+ 4 - 0
PDF Office/KMComponentLibrary/KMComponentLibrary.xcodeproj/project.pbxproj

@@ -178,6 +178,7 @@
 		BB5A9D1B2CB64D4800F64C1F /* ComponentLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5A9C722CB64D4800F64C1F /* ComponentLibrary.swift */; };
 		BB5A9D1C2CB64D4800F64C1F /* Component.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BB5A9C732CB64D4800F64C1F /* Component.xcassets */; };
 		BB5A9D1D2CB64D4800F64C1F /* brand-variables.json in Resources */ = {isa = PBXBuildFile; fileRef = BB5A9C742CB64D4800F64C1F /* brand-variables.json */; };
+		BB7221562CD1E3B500331DEA /* ComponentManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB7221552CD1E3B500331DEA /* ComponentManager.swift */; };
 		BBE788472CBCFCD2008086E2 /* ComponentBaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE788462CBCFCD2008086E2 /* ComponentBaseView.swift */; };
 /* End PBXBuildFile section */
 
@@ -354,6 +355,7 @@
 		BB5A9C722CB64D4800F64C1F /* ComponentLibrary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComponentLibrary.swift; sourceTree = "<group>"; };
 		BB5A9C732CB64D4800F64C1F /* Component.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Component.xcassets; sourceTree = "<group>"; };
 		BB5A9C742CB64D4800F64C1F /* brand-variables.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "brand-variables.json"; sourceTree = "<group>"; };
+		BB7221552CD1E3B500331DEA /* ComponentManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComponentManager.swift; sourceTree = "<group>"; };
 		BBE788462CBCFCD2008086E2 /* ComponentBaseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComponentBaseView.swift; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
@@ -392,6 +394,7 @@
 				BB5A9C742CB64D4800F64C1F /* brand-variables.json */,
 				BB5A9C732CB64D4800F64C1F /* Component.xcassets */,
 				BB5A9C722CB64D4800F64C1F /* ComponentLibrary.swift */,
+				BB7221552CD1E3B500331DEA /* ComponentManager.swift */,
 				BB5A9B9A2CB64D4700F64C1F /* Extensions */,
 				BB5A9C6D2CB64D4800F64C1F /* Model */,
 				BB5A9B9E2CB64D4700F64C1F /* View */,
@@ -1135,6 +1138,7 @@
 				BB5A9D192CB64D4800F64C1F /* ComponentProperty.swift in Sources */,
 				BB5A9CFF2CB64D4800F64C1F /* ComponentSecureTextField.swift in Sources */,
 				BB5A9CE42CB64D4800F64C1F /* ComponentCPosition.swift in Sources */,
+				BB7221562CD1E3B500331DEA /* ComponentManager.swift in Sources */,
 				BB5A9C892CB64D4800F64C1F /* ComponentDropdownToolProperty.swift in Sources */,
 				BB5A9D032CB64D4800F64C1F /* ComponentSelectProperty.swift in Sources */,
 				BB5A9CA52CB64D4800F64C1F /* ComponentEmptyProperty.swift in Sources */,

+ 45 - 0
PDF Office/KMComponentLibrary/KMComponentLibrary/ComponentManager.swift

@@ -0,0 +1,45 @@
+//
+//  ComponentManager.swift
+//  KMComponentLibrary
+//
+//  Created by Niehaoyu on 2024/10/30.
+//
+
+import Cocoa
+
+class ComponentManager: NSObject {
+
+    @objc public static let manager = ComponentManager()
+    
+    private var toolTipWorkItem: DispatchWorkItem?
+
+    var isTooltipMode: Bool = false
+    
+    override init() {
+        super.init()
+         
+    }
+    
+    //ToolTipMode
+    func callToolTipModeWithDelay() {
+        toolTipWorkItem?.cancel()
+        
+        let item = DispatchWorkItem { [weak self] in
+            self?.cancelTooltipMode()
+        }
+        
+        toolTipWorkItem = item
+        
+        DispatchQueue.main.asyncAfter(deadline: .now() + 2.0, execute: item)
+    }
+    
+    func cancelToolTipModeCall() {
+        toolTipWorkItem?.cancel()
+    }
+    
+    @objc private func cancelTooltipMode() {
+        self.isTooltipMode = false
+        
+    }
+    
+}

+ 2 - 2
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Button/ComponentButton.swift

@@ -154,6 +154,8 @@ public class ComponentButton: ComponentBaseXibView {
             } else {
                 if let image = properties.propertyInfo.leftIcon_nor?.filled(with: textColor) {
                     leftImage = image
+                } else if let image = properties.icon?.filled(with: textColor) {
+                    leftImage = image
                 }
             }
             if let image = properties.propertyInfo.rightIcon_dis {
@@ -298,7 +300,6 @@ public class ComponentButton: ComponentBaseXibView {
     }
     
     public override func mouseDown(with event: NSEvent) {
-        super.mouseDown(with: event)
         
         if properties.isDisabled == false && 
             properties.state != .pressed {
@@ -310,7 +311,6 @@ public class ComponentButton: ComponentBaseXibView {
     }
     
     public override func mouseUp(with event: NSEvent) {
-        super.mouseUp(with: event)
         
         if properties.isDisabled == false {
             

+ 46 - 49
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Card/ComponentCardFile/ComponentCardFile.swift

@@ -51,8 +51,7 @@ public class ComponentCardFile: ComponentBaseXibView {
     
     public override func awakeFromNib() {
         super.awakeFromNib()
-        
-        
+         
     }
     
     //MARK: - Setter and Getter
@@ -65,26 +64,26 @@ public class ComponentCardFile: ComponentBaseXibView {
             
             ComponentLibrary.shared.configCardFileComponent(properties: _properties)
             
-            self.setupUI()
+           setupUI()
             
-            self.refreshUI()
+           refreshUI()
         }
     }
-     
+    
     
     //MARK: - SetupUI
     func setupUI() {
-
-        self.iconImage.image = self.properties.icon
-        self.infoLabel.stringValue = self.properties.text ?? ""
+        iconImage.image = properties.icon
+        infoLabel.stringValue = properties.text ?? ""
         subTitleLabel.stringValue = properties.subText ?? ""
         markImage.image = properties.markIcon
         markImage.isHidden = !properties.isShowMarkIcon
+        
     }
     
     func refreshUI() {
         
-        self.contendBox.cornerRadius = self.properties.propertyInfo.cornerRadius
+       contendBox.cornerRadius = properties.propertyInfo.cornerRadius
         var borderWidth: CGFloat = 0
         var borderColor: NSColor?
         var fillColor: NSColor?
@@ -93,44 +92,44 @@ public class ComponentCardFile: ComponentBaseXibView {
         var subTextColor: NSColor?
         var subTextFont: NSFont?
 
-        if self.properties.state == .normal {
-            borderWidth = self.properties.propertyInfo.borderWidth
-            borderColor = self.properties.propertyInfo.borderColor_nor
-            fillColor = self.properties.propertyInfo.color_nor
-            textColor = self.properties.propertyInfo.textColor
-            textFont = self.properties.propertyInfo.textFont
-            subTextColor = self.properties.propertyInfo.subTextColor
-            subTextFont = self.properties.propertyInfo.subTextFont
-        } else if self.properties.state == .hover {
-            borderWidth = self.properties.propertyInfo.borderWidth_hov
-            borderColor = self.properties.propertyInfo.borderColor_hov
-            fillColor = self.properties.propertyInfo.color_hov
-            textColor = self.properties.propertyInfo.textColor_hov
-            textFont = self.properties.propertyInfo.textFont
-            subTextColor = self.properties.propertyInfo.subTextColor
-            subTextFont = self.properties.propertyInfo.subTextFont
-        } else if self.properties.state == .pressed {
-            borderWidth = self.properties.propertyInfo.borderWidth_active
-            borderColor = self.properties.propertyInfo.borderColor_active
-            fillColor = self.properties.propertyInfo.color_active
-            textColor = self.properties.propertyInfo.textColor_Active
-            textFont = self.properties.propertyInfo.textFont_active
-            subTextColor = self.properties.propertyInfo.subTextColor
-            subTextFont = self.properties.propertyInfo.subTextFont
+        if properties.state == .normal {
+            borderWidth = properties.propertyInfo.borderWidth
+            borderColor = properties.propertyInfo.borderColor_nor
+            fillColor = properties.propertyInfo.color_nor
+            textColor = properties.propertyInfo.textColor
+            textFont = properties.propertyInfo.textFont
+            subTextColor = properties.propertyInfo.subTextColor
+            subTextFont = properties.propertyInfo.subTextFont
+        } else if properties.state == .hover {
+            borderWidth = properties.propertyInfo.borderWidth_hov
+            borderColor = properties.propertyInfo.borderColor_hov
+            fillColor = properties.propertyInfo.color_hov
+            textColor = properties.propertyInfo.textColor_hov
+            textFont = properties.propertyInfo.textFont
+            subTextColor = properties.propertyInfo.subTextColor
+            subTextFont = properties.propertyInfo.subTextFont
+        } else if properties.state == .pressed {
+            borderWidth = properties.propertyInfo.borderWidth_active
+            borderColor = properties.propertyInfo.borderColor_active
+            fillColor = properties.propertyInfo.color_active
+            textColor = properties.propertyInfo.textColor_Active
+            textFont = properties.propertyInfo.textFont_active
+            subTextColor = properties.propertyInfo.subTextColor
+            subTextFont = properties.propertyInfo.subTextFont
         }
         
-        self.contendBox.borderWidth = borderWidth
+       contendBox.borderWidth = borderWidth
         if let color = borderColor {
-            self.contendBox.borderColor = color
+           contendBox.borderColor = color
         }
         if let color = fillColor {
-            self.contendBox.fillColor = color
+           contendBox.fillColor = color
         }
         if let color = textColor {
-            self.infoLabel.textColor = color
+           infoLabel.textColor = color
         }
         if let font = textFont {
-            self.infoLabel.font = font
+           infoLabel.font = font
         }
         
         if let color = subTextColor {
@@ -150,26 +149,25 @@ public class ComponentCardFile: ComponentBaseXibView {
         properties.propertyInfo.topIconOffset = iconImageTopConstraint.constant
         properties.propertyInfo.topLabelOffset = infoLabelTopConstraint.constant
         properties.propertyInfo.bottomOffset = bottomConstraint.constant
-
-
+ 
     }
     
     //MARK: - Public Method
     public func reloadData() {
         
-        self.setupUI()
+       setupUI()
         
-        self.refreshUI()
+       refreshUI()
         
     }
     
     //MARK: - MouseEvent
     public override func mouseEntered(with event: NSEvent) {
         super.mouseEntered(with: event)
-        if self.properties.state != .pressed {
-            self.properties.state = .hover
+        if properties.state != .pressed {
+           properties.state = .hover
             
-            self.refreshUI()
+           refreshUI()
         }
         
     }
@@ -182,12 +180,11 @@ public class ComponentCardFile: ComponentBaseXibView {
     public override func mouseExited(with event: NSEvent) {
         super.mouseExited(with: event)
          
-        if self.properties.state != .pressed {
-            self.properties.state = .normal
+        if properties.state != .pressed {
+           properties.state = .normal
             
-            self.refreshUI()
+           refreshUI()
         }
-    
     }
 
 }

+ 4 - 4
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Card/ComponentCardFile/ComponentCardFile.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -66,7 +66,7 @@
                                     </constraints>
                                 </view>
                             </box>
-                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0Ma-Op-jyQ">
+                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0Ma-Op-jyQ">
                                 <rect key="frame" x="38" y="28" width="130" height="32"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="126" id="J6Q-db-ZyN"/>
@@ -78,7 +78,7 @@
                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                 </textFieldCell>
                             </textField>
-                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cxA-Vr-f06">
+                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cxA-Vr-f06">
                                 <rect key="frame" x="38" y="12" width="130" height="16"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="126" id="Vav-x1-CXr"/>

+ 53 - 60
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Card/ComponentCardPDFTool/ComponentCardPDFTool.swift

@@ -27,9 +27,7 @@ public class ComponentCardPDFTool: ComponentBaseXibView {
     @IBOutlet var checkBox: ComponentCheckBox!
      
     @IBOutlet var iconWidthConst: NSLayoutConstraint!
-    @IBOutlet var titleLabelTopConst: NSLayoutConstraint!
-    @IBOutlet var subTitleTopConst: NSLayoutConstraint!
-     
+   
     private var _properties : ComponentCardPDFToolProperty = ComponentCardPDFToolProperty()
       
     weak open var delegate: ComponentCardPDFToolDelegate?
@@ -57,8 +55,8 @@ public class ComponentCardPDFTool: ComponentBaseXibView {
     public override func awakeFromNib() {
         super.awakeFromNib()
         
-        self.iconImage.wantsLayer = true
-        self.iconImage.layer?.masksToBounds = true
+        iconImage.wantsLayer = true
+        iconImage.layer?.masksToBounds = true
         
         checkBox.properties = ComponentCheckBoxProperty(size: .xxs, state: .normal, isDisabled: false, showhelp: false, text: nil, checkboxType: .normal)
         checkBox.setTarget(self, action: #selector(checkBoxAction(_:)))
@@ -74,75 +72,71 @@ public class ComponentCardPDFTool: ComponentBaseXibView {
             
             ComponentLibrary.shared.configCardPDFToolComponent(properties: _properties)
             
-            self.setupUI()
+            setupUI()
             
-            self.refreshUI()
+            refreshUI()
             
         }
     }
-    
-    
+     
     //MARK: - SetupUI
     func setupUI() {
         
         if properties.selectedAble == true {
-            self.iconWidthConst.constant = 24
-            self.iconImage.layer?.cornerRadius = 12
+            iconWidthConst.constant = 24
+            iconImage.layer?.cornerRadius = 12
         } else {
-            self.iconWidthConst.constant = 36
-            self.iconImage.layer?.cornerRadius = 18
+            iconWidthConst.constant = 36
+            iconImage.layer?.cornerRadius = 18
         }
-        self.iconImage.image = self.properties.icon
-        self.titleLabel.stringValue = self.properties.text ?? ""
-        self.subTitleLabel.stringValue = self.properties.subText ?? ""
+        iconImage.image = properties.icon
+        titleLabel.stringValue = properties.text ?? ""
+        subTitleLabel.stringValue = properties.subText ?? ""
         
-        if self.properties.collapse == true {
-            self.subTitleLabel.isHidden = true
+        if properties.collapse == true {
+            subTitleLabel.isHidden = true
             
-            let titleSize = self.titleLabel.sizeThatFits(CGSize(width: 1000, height: 100))
-            
-            self.titleLabelTopConst.constant = (CGRectGetHeight(self.bounds) - titleSize.height)/2
-             
+            let titleSize = titleLabel.sizeThatFits(CGSize(width: 1000, height: 100))
+            titleLabel.frame = CGRectMake(12+iconWidthConst.constant + 8, (CGRectGetHeight(contendBox.frame)-titleSize.height)/2, titleSize.width, titleSize.height)
+            titleLabel.autoresizingMask = [.maxXMargin, .minYMargin, .maxYMargin]
+ 
         } else {
-            let titleSize = self.titleLabel.sizeThatFits(CGSize(width: 1000, height: 100))
-            let subTitleSize = self.subTitleLabel.sizeThatFits(CGSizeMake(CGRectGetWidth(self.contendBox.frame)-68, 100))
+            let titleSize = titleLabel.sizeThatFits(CGSize(width: 1000, height: 100))
             
-//            titleLabelTopConst.constant = (CGRectGetHeight(self.bounds)-titleSize.height)/2 - subTitleSize.height - 2
-//            print(titleLabelTopConst.constant)
+            var subTitleSize = subTitleLabel.sizeThatFits(CGSizeMake(CGRectGetWidth(contendBox.frame)-12-iconWidthConst.constant-8-12, 100))
+            if subTitleSize.height > 32 {
+                subTitleSize.height = 30
+            }
             
-            subTitleLabel.isHidden = false
-//            subTitleTopConst.constant = titleSize.height + 4 + titleLabelTopConst.constant
+            titleLabel.frame = CGRectMake(12+iconWidthConst.constant + 8, 16+4+subTitleSize.height, titleSize.width, titleSize.height)
+            titleLabel.autoresizingMask = [.maxXMargin, .maxYMargin]
             
+            subTitleLabel.frame = CGRectMake(12+iconWidthConst.constant + 8, 16, subTitleSize.width, subTitleSize.height)
+ 
+            subTitleLabel.isHidden = false
+ 
         }
-//        
-//        titleLabel.wantsLayer = true
-//        titleLabel.layer?.backgroundColor = NSColor.red.cgColor
-//        
-//        subTitleLabel.wantsLayer = true
-//        subTitleLabel.layer?.backgroundColor = NSColor.red.cgColor
-//        
-        
-        
+         
     }
     
     func refreshUI() {
-        self.contendBox.cornerRadius = self.properties.propertyInfo.cornerRadius
-        self.contendBox.fillColor = properties.propertyInfo.color_nor
-        self.titleLabel.textColor = properties.propertyInfo.textColor
+        contendBox.cornerRadius = properties.propertyInfo.cornerRadius
+        contendBox.fillColor = properties.propertyInfo.color_nor
+        titleLabel.textColor = properties.propertyInfo.textColor
         
-        self.subTitleLabel.textColor = properties.propertyInfo.subTextColor
+        subTitleLabel.textColor = properties.propertyInfo.subTextColor
         
-        self.titleLabel.font = properties.propertyInfo.textFont
+        titleLabel.font = properties.propertyInfo.textFont
         
-        self.subTitleLabel.font = properties.propertyInfo.subTextFont
+        subTitleLabel.font = properties.propertyInfo.subTextFont
         
         
-        if self.properties.state == .normal {
-            self.contendBox.borderColor = properties.propertyInfo.borderColor_nor
-            self.contendBox.borderWidth = self.properties.propertyInfo.borderWidth
-        } else if self.properties.state == .hover {
-            self.contendBox.borderColor = properties.propertyInfo.borderColor_hov
-            self.contendBox.borderWidth = self.properties.propertyInfo.borderWidth_hov
+        if properties.state == .normal {
+            contendBox.borderColor = properties.propertyInfo.borderColor_nor
+            contendBox.borderWidth = properties.propertyInfo.borderWidth
+        } else if properties.state == .hover {
+            contendBox.borderColor = properties.propertyInfo.borderColor_hov
+            contendBox.borderWidth = properties.propertyInfo.borderWidth_hov
         }
         
         if properties.selectedAble == true && properties.isSelected == true {
@@ -150,8 +144,7 @@ public class ComponentCardPDFTool: ComponentBaseXibView {
             contendBox.borderColor = properties.propertyInfo.borderColor_hov
             contendBox.borderWidth = properties.propertyInfo.borderWidth
         }
-        
-        
+         
         checkBox.isHidden = properties.selectedAble ? false : true
         checkBox.properties.checkboxType = properties.isSelected ? .selected : .normal
         checkBox.reloadData()
@@ -166,17 +159,17 @@ public class ComponentCardPDFTool: ComponentBaseXibView {
             properties.isSelected = true
         }
         
-        self.reloadData()
+        reloadData()
         
-        self.delegate?.componentCardPDFToolDidSelectedStateUpdated?(self)
+        delegate?.componentCardPDFToolDidSelectedStateUpdated?(self)
         
     }
     
     //MARK: - Public Method
     public func reloadData() {
-        self.setupUI()
+        setupUI()
         
-        self.refreshUI()
+        refreshUI()
     }
     
     //MARK: - MouseEvent
@@ -187,7 +180,7 @@ public class ComponentCardPDFTool: ComponentBaseXibView {
             
             properties.state = .hover
             
-            self.refreshUI()
+            refreshUI()
         }
     }
     
@@ -198,7 +191,7 @@ public class ComponentCardPDFTool: ComponentBaseXibView {
             
             properties.state = .hover
             
-            self.refreshUI()
+            refreshUI()
         }
     }
     
@@ -209,21 +202,21 @@ public class ComponentCardPDFTool: ComponentBaseXibView {
             
             properties.state = .normal
             
-            self.refreshUI()
+            refreshUI()
         }
     }
     
     public override func mouseDown(with event: NSEvent) {
         super.mouseDown(with: event)
         
-        self.refreshUI()
+        refreshUI()
         
     }
     
     public override func mouseUp(with event: NSEvent) {
         super.mouseUp(with: event)
         
-        self.delegate?.componentCardPDFToolDidClicked?(self)
+        delegate?.componentCardPDFToolDidClicked?(self)
         
     }
 }

+ 10 - 18
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Card/ComponentCardPDFTool/ComponentCardPDFTool.xib

@@ -14,19 +14,18 @@
                 <outlet property="iconWidthConst" destination="9vY-ti-etS" id="llI-DG-BOR"/>
                 <outlet property="subTitleLabel" destination="nLl-zS-465" id="XOk-Db-0V5"/>
                 <outlet property="titleLabel" destination="89z-7H-gqW" id="myO-Xx-il5"/>
-                <outlet property="titleLabelTopConst" destination="4d8-4K-Il9" id="UZM-O1-LMx"/>
             </connections>
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="467" height="88"/>
+            <rect key="frame" x="0.0" y="0.0" width="240" height="88"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="gRd-t4-fFz">
-                    <rect key="frame" x="0.0" y="0.0" width="467" height="88"/>
+                    <rect key="frame" x="0.0" y="0.0" width="240" height="88"/>
                     <view key="contentView" id="Uf6-gk-6YJ">
-                        <rect key="frame" x="1" y="1" width="465" height="86"/>
+                        <rect key="frame" x="1" y="1" width="238" height="86"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Hug-T9-j0l">
@@ -37,19 +36,18 @@
                                 </constraints>
                                 <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="test" id="jhs-UP-tL4"/>
                             </imageView>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nLl-zS-465">
-                                <rect key="frame" x="54" y="34" width="401" height="16"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" relation="lessThanOrEqual" constant="32" id="xFJ-E0-AoN"/>
-                                </constraints>
+                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nLl-zS-465">
+                                <rect key="frame" x="56" y="16" width="172" height="16"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                 <textFieldCell key="cell" truncatesLastVisibleLine="YES" title="content content content content content content content content" id="ehH-eQ-Oeo">
                                     <font key="font" metaFont="system"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                 </textFieldCell>
                             </textField>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="89z-7H-gqW">
-                                <rect key="frame" x="54" y="54" width="401" height="16"/>
+                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="89z-7H-gqW">
+                                <rect key="frame" x="54" y="54" width="56" height="16"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Example" id="Zmc-LK-yn7">
                                     <font key="font" metaFont="system"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -57,7 +55,7 @@
                                 </textFieldCell>
                             </textField>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="QPd-Y0-5Be" customClass="ComponentCheckBox" customModule="KMComponentLibrary" customModuleProvider="target">
-                                <rect key="frame" x="435" y="33" width="20" height="20"/>
+                                <rect key="frame" x="208" y="33" width="20" height="20"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="20" id="dKT-bL-LLx"/>
                                     <constraint firstAttribute="width" constant="20" id="k8R-7k-YAg"/>
@@ -65,16 +63,10 @@
                             </customView>
                         </subviews>
                         <constraints>
-                            <constraint firstItem="89z-7H-gqW" firstAttribute="top" secondItem="Uf6-gk-6YJ" secondAttribute="top" constant="16" id="4d8-4K-Il9"/>
                             <constraint firstAttribute="trailing" secondItem="QPd-Y0-5Be" secondAttribute="trailing" constant="10" id="7Tc-mQ-BfQ"/>
                             <constraint firstItem="Hug-T9-j0l" firstAttribute="centerY" secondItem="Uf6-gk-6YJ" secondAttribute="centerY" id="Gkw-m3-GwF"/>
-                            <constraint firstItem="nLl-zS-465" firstAttribute="top" secondItem="89z-7H-gqW" secondAttribute="bottom" constant="4" id="J4k-ih-SOH"/>
                             <constraint firstItem="Hug-T9-j0l" firstAttribute="leading" secondItem="Uf6-gk-6YJ" secondAttribute="leading" constant="12" id="JR8-Nz-EOW"/>
-                            <constraint firstItem="89z-7H-gqW" firstAttribute="leading" secondItem="Hug-T9-j0l" secondAttribute="trailing" constant="8" id="OKo-x8-U05"/>
-                            <constraint firstAttribute="trailing" secondItem="nLl-zS-465" secondAttribute="trailing" constant="12" id="T3J-Zt-jYs"/>
                             <constraint firstItem="QPd-Y0-5Be" firstAttribute="centerY" secondItem="Uf6-gk-6YJ" secondAttribute="centerY" id="Tv8-0N-erd"/>
-                            <constraint firstAttribute="trailing" secondItem="89z-7H-gqW" secondAttribute="trailing" constant="12" id="eij-af-Nxx"/>
-                            <constraint firstItem="nLl-zS-465" firstAttribute="leading" secondItem="Hug-T9-j0l" secondAttribute="trailing" constant="8" id="k13-KX-9fQ"/>
                         </constraints>
                     </view>
                 </box>

+ 2 - 0
PDF Office/KMComponentLibrary/KMComponentLibrary/View/CheckBox/ComponentCheckBox.swift

@@ -182,6 +182,8 @@ public class ComponentCheckBox: ComponentBaseXibView {
             }
             if properties.checkboxType != .selected {
                 properties.checkboxType = .selected
+            } else {
+                properties.checkboxType = .normal
             }
             refreshUI()
             

+ 28 - 22
PDF Office/KMComponentLibrary/KMComponentLibrary/View/ComponentBaseXibView.swift

@@ -8,19 +8,18 @@
 import Cocoa
 import AppKit
 
-@objcMembers
-public class ComponentBaseXibView: NSView {
-
+@objcMembers public class ComponentBaseXibView: NSView {
+    
     @IBOutlet var contentView: NSView!
-     
+    
     var toolTipString: String?
     
     private var area : NSTrackingArea?
     
     public var viewTag: Int = 0
     
-   private var toolTipView: ComponentToolTip?
-   private var workItem: DispatchWorkItem!
+    private var toolTipView: ComponentToolTip?
+    private var workItem: DispatchWorkItem!
     
     deinit {
 #if DEBUG
@@ -32,14 +31,14 @@ public class ComponentBaseXibView: NSView {
     public required init?(coder decoder: NSCoder) {
         super.init(coder: decoder)
         self.initContentView()
- 
+        
         
     }
     
     override init(frame frameRect: NSRect) {
         super.init(frame: frameRect)
         self.initContentView()
-     
+        
     }
     
     //MARK: - Setter
@@ -55,15 +54,11 @@ public class ComponentBaseXibView: NSView {
     private func initContentView() {
         let component = ComponentLibrary()
         let isExist = component.readResourceFile(resource: String(describing:self.classForCoder.self), withExtension: "nib")
-
-//        let isExist = Bundle.main.path(forResource: String(describing:self.classForCoder.self), ofType: "nib")
-
+        
         if isExist != nil {
             var topLevelArray: NSArray? = nil
             let resource = NSNib(nibNamed: String(describing:self.classForCoder.self), bundle: Bundle(for: self.classForCoder.self))
-
-//            let resource = NSNib(nibNamed: String(describing: self.classForCoder.self),
-//                                 bundle: nil)
+            
             if resource != nil {
                 if (resource!.instantiate(withOwner: self, topLevelObjects: &topLevelArray)) {
                     for view in topLevelArray! {
@@ -91,7 +86,7 @@ public class ComponentBaseXibView: NSView {
     
     public override func updateTrackingAreas() {
         super.updateTrackingAreas()
-
+        
         if let _area = area, _area.rect.isEmpty == false {
             if (_area.rect.equalTo(bounds)) {
                 return
@@ -117,15 +112,17 @@ public class ComponentBaseXibView: NSView {
         }
         let properties: ComponentTooltipProperty = ComponentTooltipProperty(arrowPosition: .bottom_Center,
                                                                             title: self.toolTipString ?? "")
-
+        
         toolTipView?.properties = properties
-
+        
         if let tipView = toolTipView {
             point.x += CGRectGetWidth(self.frame)/2
             point.x -= CGRectGetWidth(tipView.frame)/2
         }
         toolTipView?.showWithPoint(point, inView: self.window?.contentView)
         
+        ComponentManager.manager.isTooltipMode = true
+        
     }
     
     func hideToolTips() {
@@ -137,15 +134,21 @@ public class ComponentBaseXibView: NSView {
     //MARK: - MouseEvent
     public override func mouseEntered(with event: NSEvent) {
         super.mouseEntered(with: event)
-         
+        
         if self.toolTipString != nil {
             //Tooltips
             let newWorkItem = DispatchWorkItem {
                 self.showToolTips()
             }
             workItem = newWorkItem
-            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1, execute: workItem)
-         }
+            if ComponentManager.manager.isTooltipMode {
+                DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.01, execute: workItem)
+            } else {
+                DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1, execute: workItem)
+            }
+            
+            ComponentManager.manager.cancelToolTipModeCall()
+        }
     }
     
     public override func mouseMoved(with event: NSEvent) {
@@ -156,9 +159,12 @@ public class ComponentBaseXibView: NSView {
     public override func mouseExited(with event: NSEvent) {
         super.mouseExited(with: event)
         
-        if self.toolTipString != nil {
+        if toolTipString != nil {
             workItem.cancel()
-            self.hideToolTips()
+            
+            hideToolTips()
+
+            ComponentManager.manager.callToolTipModeWithDelay()
         }
         
     }

+ 58 - 121
PDF Office/KMComponentLibrary/KMComponentLibrary/View/GroupItem/ComponentGroup.swift

@@ -17,7 +17,7 @@ import AppKit
 }
 
 public class ComponentGroup: NSView, NibLoadable {
-
+    
     @IBOutlet var contendBox: NSBox!
     @IBOutlet var scrollView: NSScrollView!
     @IBOutlet var collectionView: NSCollectionView!
@@ -37,7 +37,7 @@ public class ComponentGroup: NSView, NibLoadable {
     var subGroupView: ComponentGroup!
     
     weak open var groupDelegate: ComponentGroupDelegate?
-  
+    
     deinit {
         NotificationCenter.default.removeObserver(self)
         
@@ -45,10 +45,10 @@ public class ComponentGroup: NSView, NibLoadable {
     
     public override func draw(_ dirtyRect: NSRect) {
         super.draw(dirtyRect)
-
+        
         // Drawing code here.
         
-        if self.shadowInfo != nil {
+        if shadowInfo != nil {
             let shadow = NSShadow()
             shadow.shadowColor = shadowInfo?.shadowColor
             shadow.shadowOffset = shadowInfo?.shadowOffset ?? CGSizeZero
@@ -62,16 +62,14 @@ public class ComponentGroup: NSView, NibLoadable {
                 color.setFill()
                 roundedRect.fill()
             }
-            
         }
         
     }
     
-    
     public override func removeFromSuperview() {
         super.removeFromSuperview()
         
-        self.clearMonitor()
+        clearMonitor()
     }
     
     public required init?(coder decoder: NSCoder) {
@@ -86,53 +84,53 @@ public class ComponentGroup: NSView, NibLoadable {
     public override func awakeFromNib() {
         super.awakeFromNib()
         
-        self.shadowInfo = ComponentLibrary.shared.configShadowInfoWithKey("")
-
+        shadowInfo = ComponentLibrary.shared.configShadowInfoWithKey("")
+        
         if let value = ComponentLibrary.shared.getComponentValueFromKey("colorBg/popup") {
             let currentValue = value as! [String : Any]
-            self.contendBox.fillColor = ComponentLibrary.shared.getColor(rgbaDict: currentValue)
+            contendBox.fillColor = ComponentLibrary.shared.getColor(rgbaDict: currentValue)
         } else {
-            self.contendBox.fillColor = NSColor.clear
+            contendBox.fillColor = NSColor.clear
         }
-        self.contendBox.borderColor = NSColor.clear
-        self.contendBox.borderWidth = 0
+        contendBox.borderColor = NSColor.clear
+        contendBox.borderWidth = 0
         
-        self.scrollView.scrollerStyle = .overlay
+        scrollView.scrollerStyle = .overlay
         
-        self.collectionView.delegate = self
-        self.collectionView.dataSource = self
-        self.collectionView.backgroundColors = [NSColor.clear]
-        self.collectionView.wantsLayer = true
-        self.collectionView.layer?.backgroundColor = NSColor.clear.cgColor
-        self.collectionView.register(ComponentGroupItem.self, forItemWithIdentifier: NSUserInterfaceItemIdentifier(rawValue: "componentGroupItemID"))
+        collectionView.delegate = self
+        collectionView.dataSource = self
+        collectionView.backgroundColors = [NSColor.clear]
+        collectionView.wantsLayer = true
+        collectionView.layer?.backgroundColor = NSColor.clear.cgColor
+        collectionView.register(ComponentGroupItem.self, forItemWithIdentifier: NSUserInterfaceItemIdentifier(rawValue: "componentGroupItemID"))
         
     }
     
     //MARK: - Setter and Getter
     public var shadowInfo : ComponentShadowInfo? {
         get {
-           return _shadowInfo
+            return _shadowInfo
         }
         set {
             _shadowInfo = newValue
-              
-            self.display()
+            
+            display()
         }
     }
     
     //MARK: - Public Method
     public func updateGroupInfo(_ arr: [ComponentMenuitemProperty]) {
-        self.menuItemArr.removeAll()
+        menuItemArr.removeAll()
         
         for item in arr {
-            self.menuItemArr.append(item)
+            menuItemArr.append(item)
         }
         
-        self.reloadData()
+        reloadData()
     }
     
     public func reloadData() {
-        self.collectionView.reloadData()
+        collectionView.reloadData()
     }
     
     //MARK: - SubGroupView
@@ -144,69 +142,9 @@ public class ComponentGroup: NSView, NibLoadable {
     }
     
     //MARK: - Show
-    open func show(relativeTo positioningView: NSView) {
-        
-        var rect = self.frame
-        
-        let rectHeight = rect.size.height
-        let windowFrame = positioningView.window?.frame ?? CGRectZero
-        
-        if let subViewRect = positioningView.superview?.convert(positioningView.frame, to: positioningView.window?.contentView) {
-            rect.origin.x = CGRectGetMidX(subViewRect) - rect.size.width/2
-            rect.origin.y = subViewRect.origin.y - rectHeight
-            
-            if rect.origin.y < 0 {
-                rect.origin.y = 10
-                rect.size.height = subViewRect.origin.y - 10
-            }
-            
-            if CGRectGetMaxX(rect) > windowFrame.size.width {
-                rect.origin.x = max(0, windowFrame.size.width - rect.size.width - 10)
-            }
-        }
-         
-        self.frame = rect
-        positioningView.window?.contentView?.addSubview(self)
-         
-        self.clearMonitor()
-        
-        self.addMonitor()
-        
-    }
-    
-    public func showWithPoint(_ point: CGPoint, inView view: NSView?, withBackView: Bool = true) {
-        
-        if let subView = view {
-            var rect = self.frame
-            rect.origin.x = point.x
-            if CGRectGetMaxX(rect) > CGRectGetWidth(subView.frame) - 10 {
-                rect.origin.x = CGRectGetWidth(subView.frame) - rect.size.width - 10
-            }
-            rect.origin.y = point.y
-            if rect.origin.y < 0 {
-                rect.origin.y = 10
-                rect.size.height = subView.frame.origin.y - 10
-            }
-            self.frame = rect
-            
-            if withBackView {
-                superBGView.frame = subView.bounds
-                superBGView.wantsLayer = true
-                superBGView.layer?.backgroundColor = NSColor.gray.withAlphaComponent(0.2).cgColor
-                superBGView.autoresizingMask = [.width, .height]
-                subView.addSubview(superBGView)
-            }
-            
-            subView.addSubview(self)
-            self.clearMonitor()
-            
-            self.addMonitor()
-        }
-        
-    }
     
     public func showWithPoint(_ point: CGPoint, relativeTo positioningView: NSView?) {
-         
+        
         let screenRect = NSScreen.main!.frame
         let contentWindow: NSWindow = NSWindow(contentRect: screenRect,
                                                styleMask: [.borderless],
@@ -216,37 +154,37 @@ public class ComponentGroup: NSView, NibLoadable {
         contentWindow.makeKeyAndOrderFront(nil)
         
         if let subView = positioningView {
-            var rect = self.frame
+            var rect = frame
             rect.origin.x = point.x
             rect.origin.y = point.y
             rect.origin.x += subView.window?.frame.origin.x ?? 0
             rect.origin.y += subView.window?.frame.origin.y ?? 0
             
-            self.frame = rect
+            frame = rect
             
             contentWindow.contentView?.addSubview(self)
             
-            self.clearMonitor()
+            clearMonitor()
             
-            self.addMonitor()
-         }
+            addMonitor()
+        }
         
     }
     
     public func removeGroupView() {
-        self.superBGView.removeFromSuperview()
+        superBGView.removeFromSuperview()
         
-        self.removeFromSuperview()
+        removeFromSuperview()
         
-        self.clearMonitor()
+        clearMonitor()
         
-        self.window?.close()
+        window?.close()
     }
     
     //MARK: - subGroupView
     func showSubGroupView(itemView: ComponentGroupItem) {
-        if self.subGroupView == nil {
-            self.subGroupView = ComponentGroup.createFromNib(in: ComponentLibrary.shared.componentBundle())
+        if subGroupView == nil {
+            subGroupView = ComponentGroup.createFromNib(in: ComponentLibrary.shared.componentBundle())
         }
         var viewHeight: CGFloat = 8
         for property in itemView.properties.subPropertys {
@@ -258,9 +196,9 @@ public class ComponentGroup: NSView, NibLoadable {
                 viewHeight += 36
             }
         }
-        self.subGroupView?.frame = CGRectMake(0, 0, 160, viewHeight)
-        self.subGroupView.updateGroupInfo(itemView.properties.subPropertys)
-
+        subGroupView?.frame = CGRectMake(0, 0, 160, viewHeight)
+        subGroupView.updateGroupInfo(itemView.properties.subPropertys)
+        
         var point = CGPoint(x: 0, y: 0)
         if let subViewRect = itemView.view.superview?.convert(itemView.view.frame, to: itemView.view.window?.contentView) {
             point.x = CGRectGetMaxX(subViewRect)
@@ -271,25 +209,25 @@ public class ComponentGroup: NSView, NibLoadable {
             return
         }
         if point.x + CGRectGetWidth(self.subGroupView.frame) > CGRectGetWidth(subView.frame) - 10 {
-            if let selfConvertPoint = self.superview?.convert(self.frame.origin, to: subView) {
+            if let selfConvertPoint = superview?.convert(self.frame.origin, to: subView) {
                 point.x = selfConvertPoint.x - CGRectGetWidth(self.subGroupView.frame)
             }
         }
-        self.subGroupView.showWithPoint(point, inView: itemView.view.window?.contentView, withBackView: false)
+        subGroupView.showWithPoint(point, relativeTo: self)
     }
     
     //MARK: - Private Method
     func addMonitor() {
-        if self.globalMonitor == nil {
-            self.globalMonitor = NSEvent.addGlobalMonitorForEvents(matching: [.leftMouseDown], handler: { (event) in
+        if globalMonitor == nil {
+            globalMonitor = NSEvent.addGlobalMonitorForEvents(matching: [.leftMouseDown], handler: { (event) in
                 if event.type == .leftMouseDown {
                     self.leftMouseDownAction()
                 }
             })
         }
         
-        if self.localMonitor == nil {
-            self.localMonitor = NSEvent.addLocalMonitorForEvents(matching: [.leftMouseDown, .scrollWheel], handler: { (event) in
+        if localMonitor == nil {
+            localMonitor = NSEvent.addLocalMonitorForEvents(matching: [.leftMouseDown, .scrollWheel], handler: { (event) in
                 if event.type == .leftMouseDown {
                     let point = self.convert(event.locationInWindow, from: nil)
                     if CGRectContainsPoint(self.bounds, point) {
@@ -309,27 +247,26 @@ public class ComponentGroup: NSView, NibLoadable {
             })
         }
     }
-          
+    
     func clearMonitor() {
-        if self.localMonitor != nil {
+        if localMonitor != nil {
             NSEvent.removeMonitor(self.localMonitor as Any)
-            self.localMonitor = nil
+            localMonitor = nil
         }
         
-        if self.globalMonitor != nil {
+        if globalMonitor != nil {
             NSEvent.removeMonitor(self.globalMonitor as Any)
-            self.globalMonitor = nil
+            globalMonitor = nil
         }
     }
     
     func leftMouseDownAction() {
         
-        self.groupDelegate?.componentGroupDidDismiss?(group: self)
+        groupDelegate?.componentGroupDidDismiss?(group: self)
         
-        self.removeGroupView()
+        removeGroupView()
         
     }
-    
 }
 
 //MARK: - NSCollectionViewDelegate
@@ -343,14 +280,14 @@ extension ComponentGroup: NSCollectionViewDataSource {
     }
     
     public func collectionView(_ collectionView: NSCollectionView, numberOfItemsInSection section: Int) -> Int {
-        return self.menuItemArr.count
+        return menuItemArr.count
     }
     
     public func collectionView(_ collectionView: NSCollectionView, itemForRepresentedObjectAt indexPath: IndexPath) -> NSCollectionViewItem {
  
         let itemView = collectionView.makeItem(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "componentGroupItemID"), for: indexPath) as! ComponentGroupItem
-        if indexPath.item < self.menuItemArr.count {
-            let properties = self.menuItemArr[indexPath.item]
+        if indexPath.item < menuItemArr.count {
+            let properties = menuItemArr[indexPath.item]
             itemView.setUpWithProperties(properties)
         }
         itemView.clickHandle = {[weak self] view in
@@ -392,8 +329,8 @@ extension ComponentGroup: NSCollectionViewDelegateFlowLayout {
     public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> NSSize {
         
         var viewHeight: CGFloat = 36
-        if indexPath.item < self.menuItemArr.count {
-            let properties = self.menuItemArr[indexPath.item]
+        if indexPath.item < menuItemArr.count {
+            let properties = menuItemArr[indexPath.item]
             if properties.type == .divider {
                 viewHeight = 8
             }

+ 1 - 1
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Input/ComponentInput/ComponentInput.xib

@@ -40,7 +40,7 @@
                                 </constraints>
                                 <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="test" id="Crb-DU-hdX"/>
                             </imageView>
-                            <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Sst-Ik-YEc" customClass="ComponentTextField" customModule="KMComponentLibrary" customModuleProvider="target">
+                            <textField focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Sst-Ik-YEc" customClass="ComponentTextField" customModule="KMComponentLibrary" customModuleProvider="target">
                                 <rect key="frame" x="30" y="10" width="232" height="20"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="20" id="xJd-f5-u53"/>

+ 15 - 0
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Message/ComponentMessage.swift

@@ -168,4 +168,19 @@ public class ComponentMessage: ComponentBaseXibView {
         
     }
     
+    public func showWithPoint(_ point: CGPoint, inView positioningView: NSView?) {
+        var rect = self.frame
+        rect.origin.x = point.x
+        rect.origin.y = point.y
+        rect.size.width = properties.propertyInfo.viewWidth
+        rect.size.height = properties.propertyInfo.viewHeight
+        self.frame = rect
+        
+        positioningView?.addSubview(self)
+        
+        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 2) {
+            self.removeFromSuperview()
+        }
+    }
+    
 }

+ 1 - 1
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Pagination/ComponentPagination.swift

@@ -182,7 +182,7 @@ public class ComponentPagination: ComponentBaseXibView {
     public override func mouseDown(with event: NSEvent) {
         super.mouseDown(with: event)
         
-//        window?.makeFirstResponder(nil)
+        window?.makeFirstResponder(nil)
     }
     
     public override func mouseUp(with event: NSEvent) {

+ 25 - 23
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelect.swift

@@ -11,11 +11,11 @@ import AppKit
 @objc public protocol ComponentSelectDelegate: AnyObject {
     
     @objc optional func componentSelectDidSelect(view: ComponentSelect?, menuItemProperty: ComponentMenuitemProperty?)
-
+    
 }
 
 public class ComponentSelect: ComponentBaseXibView {
-
+    
     @IBOutlet var contendBox: NSBox!
     @IBOutlet var leftIconImage: NSImageView!
     @IBOutlet var rightIconImage: NSImageView!
@@ -34,11 +34,11 @@ public class ComponentSelect: ComponentBaseXibView {
     private var groupView: ComponentGroup!
     
     private var menuitemPropertys: [ComponentMenuitemProperty] = []
-
-    private var selItemProperty: ComponentMenuitemProperty? = ComponentMenuitemProperty()
+    
+    private var selItemProperty: ComponentMenuitemProperty?
     
     weak open var delegate: ComponentSelectDelegate?
-
+    
     // MARK: 初始化
     deinit {
         NotificationCenter.default.removeObserver(self)
@@ -56,7 +56,7 @@ public class ComponentSelect: ComponentBaseXibView {
     
     public override func awakeFromNib() {
         super.awakeFromNib()
-       
+        
         inputField.componentDelegate = self
         inputField.focusRingType = .none
         
@@ -97,7 +97,7 @@ public class ComponentSelect: ComponentBaseXibView {
     }
     
     public func selectItemAtIndex(_ index: Int) {
-         if index >= 0 && index < menuitemPropertys.count {
+        if index >= 0 && index < menuitemPropertys.count {
             let chooseIndex: Int = index
             let chooseProperty = menuitemPropertys[chooseIndex]
             inputField.stringValue = chooseProperty.text
@@ -147,17 +147,13 @@ public class ComponentSelect: ComponentBaseXibView {
         inputField.font = properties.propertyInfo.textFont
         inputField.stringValue = properties.text ?? ""
         
-        if let chooseProperty = selItemProperty {
-            inputField.stringValue = chooseProperty.text
-        }
-        
     }
     
     func refreshUI() {
         
         contendBox.cornerRadius = properties.propertyInfo.cornerRadius
         contendBox.borderWidth = properties.propertyInfo.borderWidth
-         
+        
         var fillColor: NSColor?
         var borderColor: NSColor?
         if properties.state == .normal {
@@ -195,7 +191,7 @@ public class ComponentSelect: ComponentBaseXibView {
         if let color = borderColor {
             contendBox.borderColor = color
         }
-    
+        
         if let placeholder = properties.placeholder {
             inputField.placeholderString = placeholder
         }
@@ -234,13 +230,16 @@ public class ComponentSelect: ComponentBaseXibView {
             }
         }
         
+        var point = convert(contendBox.frame.origin, to: nil)
+        point.y -= viewHeight
+        
         if groupView == nil {
             groupView = ComponentGroup.createFromNib(in: ComponentLibrary.shared.componentBundle())
         }
         groupView?.frame = CGRectMake(310, 0, 260, viewHeight)
         groupView?.reloadData()
         groupView.groupDelegate = self
-        groupView.show(relativeTo: self)
+        groupView.showWithPoint(point, relativeTo: contendBox)
         groupView?.updateGroupInfo(menuitemPropertys)
         isGroupViewShow = true
     }
@@ -262,13 +261,18 @@ public class ComponentSelect: ComponentBaseXibView {
     }
     
     @objc func textFieldDidEndEditingNotification(_ notification: Notification) {
-    
+        if properties.isDisabled == false &&
+            isGroupViewShow == false {
+            properties.state = .normal
+            
+            refreshUI()
+        }
     }
     
     //MARK: - MouseEvent
     public override func mouseEntered(with event: NSEvent) {
         super.mouseEntered(with: event)
-         
+        
         if properties.isDisabled == false &&
             inputField.isResponder == false &&
             isGroupViewShow == false {
@@ -281,7 +285,7 @@ public class ComponentSelect: ComponentBaseXibView {
         super.mouseMoved(with: event)
         
     }
-     
+    
     public override func mouseExited(with event: NSEvent) {
         super.mouseExited(with: event)
         
@@ -296,7 +300,7 @@ public class ComponentSelect: ComponentBaseXibView {
     
     public override func mouseDown(with event: NSEvent) {
         super.mouseDown(with: event)
-         
+        
     }
     
     public override func mouseUp(with event: NSEvent) {
@@ -305,19 +309,18 @@ public class ComponentSelect: ComponentBaseXibView {
         if properties.isDisabled == false {
             let point = convert(event.locationInWindow, from: nil)
             if CGRectContainsPoint(rightIconImage.frame, point) {
+                window?.makeFirstResponder(rightIconImage)
+                
                 properties.state = .pressed
                 
                 showGroupView()
-                
             }
-            
         }
         
         if properties.isDisabled == false &&
             inputField.isResponder == false &&
             isGroupViewShow == false {
             properties.state = .normal
-            
         }
         refreshUI()
     }
@@ -339,8 +342,6 @@ extension ComponentSelect: ComponentTextFieldDelegate {
             }
         }
         refreshUI()
-        
-        
     }
 }
 
@@ -356,6 +357,7 @@ extension ComponentSelect: ComponentGroupDelegate {
     
     public func componentGroupDidSelect(group: ComponentGroup?, menuItemProperty: ComponentMenuitemProperty?) {
         inputField.stringValue = menuItemProperty?.text ?? ""
+        properties.text = inputField.stringValue
         
         properties.state = .normal
         

+ 2 - 0
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelectProperty.swift

@@ -25,6 +25,8 @@ public class ComponentSelectProperties: NSObject {
     
     public var propertyInfo = SelectPropertyInfo()
     
+    public var menuItemArr: [ComponentMenuitemProperty]? = nil
+    
     public init(size: ComponentSize = .m,
                 state: ComponentState = .normal,
                 isDisabled: Bool = false,

+ 3 - 1
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/SelectZoom/ComponentSelectZoom.swift

@@ -177,13 +177,15 @@ public class ComponentSelectZoom: ComponentBaseXibView {
             }
         }
         
+        let point = convert(contendBox.frame.origin, to: nil)
+         
         if groupView == nil {
             groupView = ComponentGroup.createFromNib(in: ComponentLibrary.shared.componentBundle())
         }
         groupView?.frame = CGRectMake(310, 0, 260, viewHeight)
         groupView?.reloadData()
         groupView.groupDelegate = self
-        groupView?.show(relativeTo: self)
+        groupView?.showWithPoint(point, relativeTo: contendBox)
         groupView?.updateGroupInfo(properties.menuItemArr)
         
         isGroupViewShow = true

+ 71 - 73
PDF Office/KMComponentLibrary/KMComponentLibrary/View/ToolTips/ComponentToolTip.swift

@@ -19,7 +19,6 @@ public class ComponentToolTip: ComponentBaseXibView {
     @IBOutlet var contendBottomConst: NSLayoutConstraint!
     @IBOutlet var contendTopConst: NSLayoutConstraint!
     
-    
     // MARK: Private Property
     private var _properties : ComponentTooltipProperty = ComponentTooltipProperty()
     
@@ -30,62 +29,62 @@ public class ComponentToolTip: ComponentBaseXibView {
         
         let path = NSBezierPath()
         
-        if self.properties.arrowPosition == .left_Top {
+        if properties.arrowPosition == .left_Top {
             path.move(to: NSPoint(x: 0, y: bounds.height*0.75))
             path.line(to: NSPoint(x: 6, y: bounds.height*0.75-6))
             path.line(to: NSPoint(x: 6, y: bounds.height*0.75+6))
             
-        } else if self.properties.arrowPosition == .left_Center {
+        } else if properties.arrowPosition == .left_Center {
             path.move(to: NSPoint(x: 0, y: bounds.height*0.5))
             path.line(to: NSPoint(x: 6, y: bounds.height*0.5-6))
             path.line(to: NSPoint(x: 6, y: bounds.height*0.5+6))
             
-        } else if self.properties.arrowPosition == .left_Bottom {
+        } else if properties.arrowPosition == .left_Bottom {
             path.move(to: NSPoint(x: 0, y: bounds.height*0.25))
             path.line(to: NSPoint(x: 6, y: bounds.height*0.25-6))
             path.line(to: NSPoint(x: 6, y: bounds.height*0.25+6))
             
-        } else if self.properties.arrowPosition == .top_Center {
+        } else if properties.arrowPosition == .top_Center {
             path.move(to: NSPoint(x: bounds.width*0.5-6, y: bounds.height-6))
             path.line(to: NSPoint(x: bounds.width*0.5+6, y: bounds.height-6))
             path.line(to: NSPoint(x: bounds.width*0.5, y: bounds.height))
             
-        } else if self.properties.arrowPosition == .top_Left {
+        } else if properties.arrowPosition == .top_Left {
             path.move(to: NSPoint(x: bounds.width*0.25-6, y: bounds.height-6))
             path.line(to: NSPoint(x: bounds.width*0.25+6, y: bounds.height-6))
             path.line(to: NSPoint(x: bounds.width*0.25, y: bounds.height))
             
-        } else if self.properties.arrowPosition == .top_Right {
+        } else if properties.arrowPosition == .top_Right {
             path.move(to: NSPoint(x: bounds.width*0.75-6, y: bounds.height-6))
             path.line(to: NSPoint(x: bounds.width*0.75+6, y: bounds.height-6))
             path.line(to: NSPoint(x: bounds.width*0.75, y: bounds.height))
             
-        } else if self.properties.arrowPosition == .bottom_Center {
+        } else if properties.arrowPosition == .bottom_Center {
             path.move(to: NSPoint(x: bounds.width*0.5-6, y: 6))
             path.line(to: NSPoint(x: bounds.width*0.5+6, y: 6))
             path.line(to: NSPoint(x: bounds.width*0.5, y: 0))
             
-        } else if self.properties.arrowPosition == .bottom_Left {
+        } else if properties.arrowPosition == .bottom_Left {
             path.move(to: NSPoint(x: bounds.width*0.25-6, y: 6))
             path.line(to: NSPoint(x: bounds.width*0.25+6, y: 6))
             path.line(to: NSPoint(x: bounds.width*0.25, y: 0))
             
-        } else if self.properties.arrowPosition == .bottom_Right {
+        } else if properties.arrowPosition == .bottom_Right {
             path.move(to: NSPoint(x: bounds.width*0.75-6, y: 6))
             path.line(to: NSPoint(x: bounds.width*0.75+6, y: 6))
             path.line(to: NSPoint(x: bounds.width*0.75, y: 0))
             
-        } else if self.properties.arrowPosition == .right_Top{
+        } else if properties.arrowPosition == .right_Top{
             path.move(to: NSPoint(x: bounds.width, y: bounds.height*0.75))
             path.line(to: NSPoint(x: bounds.width-6, y: bounds.height*0.75-6))
             path.line(to: NSPoint(x: bounds.width-6, y: bounds.height*0.75+6))
             
-        } else if self.properties.arrowPosition == .right_Center {
+        } else if properties.arrowPosition == .right_Center {
             path.move(to: NSPoint(x: bounds.width, y: bounds.height*0.5))
             path.line(to: NSPoint(x: bounds.width-6, y: bounds.height*0.5-6))
             path.line(to: NSPoint(x: bounds.width-6, y: bounds.height*0.5+6))
             
-        }  else if self.properties.arrowPosition == .right_Bottom {
+        }  else if properties.arrowPosition == .right_Bottom {
             path.move(to: NSPoint(x: bounds.width, y: bounds.height*0.25))
             path.line(to: NSPoint(x: bounds.width-6, y: bounds.height*0.25-6))
             path.line(to: NSPoint(x: bounds.width-6, y: bounds.height*0.25+6))
@@ -125,122 +124,124 @@ public class ComponentToolTip: ComponentBaseXibView {
             _properties = newValue
             ComponentLibrary.shared.configTooltipComponent(properties: _properties)
             
-            self.setupUI()
+            setupUI()
         }
     }
     
     //MARK: - SetupUI
     func setupUI() {
          
-        self.contendBox.borderWidth = self.properties.propertyInfo.borderWidth
-        self.contendBox.cornerRadius = self.properties.propertyInfo.cornerRadius
-        self.contendBox.fillColor = properties.propertyInfo.color_nor
+        contendBox.borderWidth = properties.propertyInfo.borderWidth
+        contendBox.cornerRadius = properties.propertyInfo.cornerRadius
+        contendBox.fillColor = properties.propertyInfo.color_nor
         
         contendLeftConst.constant = 0
         contendRightConst.constant = 0
         contendBottomConst.constant = 0
         contendTopConst.constant = 0
         
-        if self.properties.arrowPosition == .left_Top ||
-            self.properties.arrowPosition == .left_Center ||
-            self.properties.arrowPosition == .left_Bottom {
+        if properties.arrowPosition == .left_Top ||
+            properties.arrowPosition == .left_Center ||
+            properties.arrowPosition == .left_Bottom {
             contendLeftConst.constant = 6
             
-        } else if self.properties.arrowPosition == .top_Left ||
-                    self.properties.arrowPosition == .top_Center ||
-                    self.properties.arrowPosition == .top_Right {
+        } else if properties.arrowPosition == .top_Left ||
+                    properties.arrowPosition == .top_Center ||
+                    properties.arrowPosition == .top_Right {
             contendTopConst.constant = 6
             
-        } else if self.properties.arrowPosition == .bottom_Left ||
-                    self.properties.arrowPosition == .bottom_Center ||
-                    self.properties.arrowPosition == .bottom_Right {
+        } else if properties.arrowPosition == .bottom_Left ||
+                    properties.arrowPosition == .bottom_Center ||
+                    properties.arrowPosition == .bottom_Right {
             contendBottomConst.constant = 6
             
-        } else if self.properties.arrowPosition == .right_Top ||
-                    self.properties.arrowPosition == .right_Center ||
-                    self.properties.arrowPosition == .right_Bottom {
+        } else if properties.arrowPosition == .right_Top ||
+                    properties.arrowPosition == .right_Center ||
+                    properties.arrowPosition == .right_Bottom {
             contendRightConst.constant = 6
             
         }
         
-        self.display()
+        display()
         
         var widthAddition: CGFloat = 0
         var heightAddition: CGFloat = 0
         
         if properties.infoString != nil {
-            self.titleLabel.isHidden = false
+            titleLabel.isHidden = false
             
-            self.titleLabel.font = self.properties.propertyInfo.textFont
-            self.infoLabel.font = self.properties.propertyInfo.subTextFont
+            titleLabel.font = properties.propertyInfo.textFont
+            infoLabel.font = properties.propertyInfo.subTextFont
             
-            self.titleLabel.stringValue = self.properties.title
-            self.titleLabel.sizeToFit()
+            titleLabel.stringValue = properties.title
+            titleLabel.sizeToFit()
              
-            self.infoLabel.stringValue = self.properties.infoString ?? ""
-            let infoSize = self.infoLabel.sizeThatFits(NSSize(width: 304, height: 1000))
+            infoLabel.stringValue = properties.infoString ?? ""
+            let infoSize = infoLabel.sizeThatFits(NSSize(width: 304, height: 1000))
             
-            var infoRect = self.infoLabel.frame
+            var infoRect = infoLabel.frame
             infoRect.size.width = infoSize.width
             infoRect.size.height = infoSize.height
-            self.infoLabel.frame = infoRect
+            infoLabel.frame = infoRect
             
-            self.properties.propertyInfo.viewWidth = 304 + (self.properties.propertyInfo.layout_paddingLeft) + (self.properties.propertyInfo.layout_paddingRight)
-            self.properties.propertyInfo.viewHeight = (self.properties.propertyInfo.layout_paddingTop) + self.titleLabel.frame.size.height + (self.properties.propertyInfo.layout_gap) + infoSize.height + (self.properties.propertyInfo.layout_paddingBottom)
+            properties.propertyInfo.viewWidth = 304 + (properties.propertyInfo.layout_paddingLeft) + (properties.propertyInfo.layout_paddingRight)
+            properties.propertyInfo.viewHeight = (properties.propertyInfo.layout_paddingTop) + titleLabel.frame.size.height + (properties.propertyInfo.layout_gap) + infoSize.height + (properties.propertyInfo.layout_paddingBottom)
         } else {
-            self.infoLabel.isHidden = true
+            infoLabel.isHidden = true
             
-            self.titleLabel.font = self.properties.propertyInfo.subTextFont
+            titleLabel.font = properties.propertyInfo.subTextFont
+            titleLabel.stringValue = properties.title
             
-            self.titleLabel.stringValue = self.properties.title
-            self.titleLabel.sizeToFit()
+            let size = titleLabel.sizeThatFits(CGSizeMake(properties.textMaxWidth, 500))
+            var rect = titleLabel.frame
+            rect.size.width = size.width
+            rect.size.height = size.height
+            titleLabel.frame = rect
             
-            self.properties.propertyInfo.viewWidth = self.titleLabel.frame.size.width + (self.properties.propertyInfo.layout_paddingLeft) + (self.properties.propertyInfo.layout_paddingRight)
-            self.properties.propertyInfo.viewHeight = self.titleLabel.frame.size.height + (self.properties.propertyInfo.layout_paddingTop) + (self.properties.propertyInfo.layout_paddingBottom)
+            properties.propertyInfo.viewWidth = titleLabel.frame.size.width + (properties.propertyInfo.layout_paddingLeft) + (properties.propertyInfo.layout_paddingRight)
+            properties.propertyInfo.viewHeight = titleLabel.frame.size.height + (properties.propertyInfo.layout_paddingTop) + (properties.propertyInfo.layout_paddingBottom)
         }
         
-        if self.properties.arrowPosition == .left_Top ||
-            self.properties.arrowPosition == .left_Center ||
-            self.properties.arrowPosition == .left_Bottom ||
-            self.properties.arrowPosition == .right_Top ||
-            self.properties.arrowPosition == .right_Center ||
-            self.properties.arrowPosition == .right_Bottom {
+        if properties.arrowPosition == .left_Top ||
+            properties.arrowPosition == .left_Center ||
+            properties.arrowPosition == .left_Bottom ||
+            properties.arrowPosition == .right_Top ||
+            properties.arrowPosition == .right_Center ||
+            properties.arrowPosition == .right_Bottom {
             widthAddition = 6
         } else {
             heightAddition = 6
         }
         
-        self.properties.propertyInfo.viewWidth += widthAddition
-        self.properties.propertyInfo.viewHeight += heightAddition
+        properties.propertyInfo.viewWidth += widthAddition
+        properties.propertyInfo.viewHeight += heightAddition
         
-        var rect = self.frame
-        rect.size.width = self.properties.propertyInfo.viewWidth
-        rect.size.height = self.properties.propertyInfo.viewHeight
-        self.frame = rect
+        var rect = frame
+        rect.size.width = properties.propertyInfo.viewWidth
+        rect.size.height = properties.propertyInfo.viewHeight
+        frame = rect
         
         if properties.infoString != nil {
             
         } else {
-            self.titleLabel.frame = CGRectMake((CGRectGetWidth(self.frame)-CGRectGetWidth(self.titleLabel.frame))/2,
+            titleLabel.frame = CGRectMake((CGRectGetWidth(frame)-CGRectGetWidth(titleLabel.frame))/2,
                                                properties.propertyInfo.layout_paddingBottom,
-                                               CGRectGetWidth(self.titleLabel.frame), CGRectGetHeight(self.titleLabel.frame))
-            self.titleLabel.autoresizingMask = [.maxXMargin, .maxYMargin]
+                                               CGRectGetWidth(titleLabel.frame), CGRectGetHeight(titleLabel.frame))
+            titleLabel.autoresizingMask = [.maxXMargin, .maxYMargin]
             
         }
         
-        self.titleLabel.textColor = properties.propertyInfo.textColor
-        self.infoLabel.textColor = properties.propertyInfo.textColor
+        titleLabel.textColor = properties.propertyInfo.textColor
+        infoLabel.textColor = properties.propertyInfo.textColor
         
     }
      
     public func reloadData() {
-        self.setupUI()
+        setupUI()
         
     }
     
     public func showWithPoint(_ point: CGPoint, inView view: NSView?) {
-        
-        
         let screenRect = NSScreen.main!.frame
         let contentWindow: NSWindow = NSWindow(contentRect: screenRect,
                                                styleMask: [.borderless],
@@ -250,25 +251,22 @@ public class ComponentToolTip: ComponentBaseXibView {
         contentWindow.makeKeyAndOrderFront(nil)
         
         if let subView = view {
-            var rect = self.frame
+            var rect = frame
             rect.origin.x = point.x
             rect.origin.y = point.y
             rect.origin.x += subView.window?.frame.origin.x ?? 0
             rect.origin.y += subView.window?.frame.origin.y ?? 0
             
-            self.frame = rect
+            frame = rect
             
             contentWindow.contentView?.addSubview(self)
          }
-        
     }
     
     public override func removeFromSuperview() {
         super.removeFromSuperview()
         
-        self.window?.close()
+        window?.close()
         
     }
-    
-    
 }

+ 1 - 1
PDF Office/KMComponentLibrary/KMComponentLibrary/View/ToolTips/ComponentToolTip.xib

@@ -32,7 +32,7 @@
                             <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tAI-Ra-b5K">
                                 <rect key="frame" x="18" y="120" width="37" height="16"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                                <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="qMC-uy-dS0">
+                                <textFieldCell key="cell" title="Label" id="qMC-uy-dS0">
                                     <font key="font" usesAppearanceFont="YES"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>

+ 7 - 1
PDF Office/KMComponentLibrary/KMComponentLibrary/View/ToolTips/ComponentToolTipProperty.swift

@@ -14,15 +14,19 @@ public class ComponentTooltipProperty: NSObject {
     public var title: String = "" //文本信息
     public var infoString: String? //二级文字信息
     
+    public var textMaxWidth: CGFloat = 304
+    
     public var propertyInfo = TooltipPropertyInfo()
     
     public init(arrowPosition: ComponentPositionType = .left_Top,
                 title: String = "",
-                infoString: String? = nil) {
+                infoString: String? = nil,
+                textMaxWidth: CGFloat = 304) {
 
         self.arrowPosition = arrowPosition
         self.title = title
         self.infoString = infoString
+        self.textMaxWidth = textMaxWidth
         
     }
 }
@@ -116,6 +120,8 @@ extension ComponentLibrary {
             }
         }
         
+        
+        
     }
     
     

+ 4 - 4
PDF Office/KMComponentLibrary/KMComponentLibrary/View/ToolTips/ComponentToolTipsHelp.swift

@@ -35,7 +35,7 @@ public class ComponentToolTipsHelp: ComponentBaseXibView {
     public override func awakeFromNib() {
         super.awakeFromNib()
 
-        self.reloadData()
+        reloadData()
          
     }
     
@@ -43,20 +43,20 @@ public class ComponentToolTipsHelp: ComponentBaseXibView {
         
     }
     
-    
     public func setTarget(_ target: AnyObject?, action: Selector?) {
         self.target = target!
         self.action = action!
     }
     
     @IBAction func clickAction(_ sender: Any) {
+        
     }
     
     //MARK: - MouseEvent
     public override func mouseEntered(with event: NSEvent) {
         super.mouseEntered(with: event)
         
-        self.iconImage.image = ComponentLibrary.shared.image(forResource: "ComTooltipsHelp_hov")
+        iconImage.image = ComponentLibrary.shared.image(forResource: "ComTooltipsHelp_hov")
     }
     
     public override func mouseMoved(with event: NSEvent) {
@@ -67,7 +67,7 @@ public class ComponentToolTipsHelp: ComponentBaseXibView {
     public override func mouseExited(with event: NSEvent) {
         super.mouseExited(with: event)
         
-        self.iconImage.image = ComponentLibrary.shared.image(forResource: "ComTooltipsHelp_nor")
+        iconImage.image = ComponentLibrary.shared.image(forResource: "ComTooltipsHelp_nor")
     }
     
     public override func mouseDown(with event: NSEvent) {

+ 5 - 5
PDF Office/PDF Master/AppDelegate.swift

@@ -594,11 +594,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
         }
         
         let document: KMMainDocument = model?.activeTabContents() as! KMMainDocument
-//        if let data = document.pdfViewController?.saveWatermarkFlag, !data {
-//            let represent : NSSharingService = sender.representedObject as! NSSharingService
-//            represent.perform(withItems: [document.fileURL as Any])
-//            return
-//        }
+        if let data = document.mainViewController?.saveWatermarkFlag, !data {
+            let represent : NSSharingService = sender.representedObject as! NSSharingService
+            represent.perform(withItems: [document.fileURL as Any])
+            return
+        }
 
         let represent : NSSharingService = sender.representedObject as! NSSharingService
         represent.perform(withItems: [document.fileURL as Any])

+ 1 - 1
PDF Office/PDF Master/Class/AIInfo/AIConfigWindowController/AINewConfigWindowController.xib

@@ -18,7 +18,7 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="196" y="240" width="276" height="739"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1512" height="944"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
             <value key="minSize" type="size" width="276" height="739"/>
             <value key="maxSize" type="size" width="276" height="2739"/>
             <view key="contentView" id="se5-gp-TjO">

BIN
PDF Office/PDF Master/Class/Appearance/black_pdfreaderpro_home_en.pdf


+ 85 - 85
PDF Office/PDF Master/Class/ChromiumTabs/KMBrowser.swift

@@ -44,14 +44,14 @@ import Cocoa
             isCloseAllTabViewItem = false
         } else {
             let currentDocument = tabStripModel.tabContents(at: Int32(numberOfTabViewItem-1)) as! KMMainDocument
-//            if (currentDocument.isHome == false) {
-//                currentDocument.mainViewController?.savePageNumberIfNeed()
-//                if let _isEdited = currentDocument.mainViewController?.listView.isEdited(), _isEdited, !currentDocument.isDocumentEdited {
-//                    currentDocument.updateChangeCount(.changeDone)
-//                }
-//            }
+            if (currentDocument.isHome == false) {
+                currentDocument.mainViewController?.savePageNumberIfNeed()
+                if let _isEdited = currentDocument.mainViewController?.listView.isEdited(), _isEdited, !currentDocument.isDocumentEdited {
+                    currentDocument.updateChangeCount(.changeDone)
+                }
+            }
             // 清理数据 [主要清空通知]
-//            currentDocument.mainViewController?.clearData()
+            currentDocument.mainViewController?.clearData()
             self._trackCloseDocumentEvent()
             
             if (currentDocument.isEqual(to: self.currentDocument)) {
@@ -84,44 +84,44 @@ import Cocoa
                         numberOfTabViewItem = numberOfTabViewItem - 1
                         closeTabViewItem()
                     }
-//                } else if (currentDocument.mainViewController != nil) {
-//                    if (currentDocument.mainViewController!.isPDFDocumentEdited || currentDocument.mainViewController!.needSave) {
-//                        if (isPrompt) {
-//                            let alert = NSAlert()
-//                            let message = "Do you want to save the changes made to the document “\(currentDocument.fileURL!.lastPathComponent)”?"
-//                            alert.messageText = message
-//                            alert.informativeText = NSLocalizedString("Your changes will be lost if you don’t save them.", comment: "")
-//                            alert.addButton(withTitle: NSLocalizedString("Save", comment: ""))
-//                            alert.addButton(withTitle: NSLocalizedString("Don‘t Save", comment: ""))
-//                            alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
-//                            let response = alert.runModal()
-//                            if (response == .alertFirstButtonReturn) { // 保存
-//                                currentDocument.save(nil)
-//                                tabStripModel.detachTabContents(at: Int32(numberOfTabViewItem - 1))
-//                                currentDocument.close()
-//                            } else if (response == .alertSecondButtonReturn) { // 不保存
-//                                tabStripModel.detachTabContents(at: Int32(numberOfTabViewItem - 1))
-//                                currentDocument.close()
-//                            } else { // 取消
-//                                self.isCloseAllTabViewItem = false
-//                            }
-//                        } else {
-//                            currentDocument.save(nil)
-//                            currentDocument.close()
-//                        }
-//                        
-//                        if isCloseAllTabViewItem {
-//                            numberOfTabViewItem = numberOfTabViewItem - 1
-//                            closeTabViewItem()
-//                        }
-//                    } else {
-//                        tabStripModel.detachTabContents(at: Int32(numberOfTabViewItem - 1))
-//                        currentDocument.close()
-//                        if isCloseAllTabViewItem {
-//                            numberOfTabViewItem = numberOfTabViewItem - 1
-//                            closeTabViewItem()
-//                        }
-//                    }
+                } else if (currentDocument.mainViewController != nil) {
+                    if (currentDocument.mainViewController!.isPDFDocumentEdited || currentDocument.mainViewController!.needSave) {
+                        if (isPrompt) {
+                            let alert = NSAlert()
+                            let message = "Do you want to save the changes made to the document “\(currentDocument.fileURL!.lastPathComponent)”?"
+                            alert.messageText = message
+                            alert.informativeText = NSLocalizedString("Your changes will be lost if you don’t save them.", comment: "")
+                            alert.addButton(withTitle: NSLocalizedString("Save", comment: ""))
+                            alert.addButton(withTitle: NSLocalizedString("Don‘t Save", comment: ""))
+                            alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
+                            let response = alert.runModal()
+                            if (response == .alertFirstButtonReturn) { // 保存
+                                currentDocument.save(nil)
+                                tabStripModel.detachTabContents(at: Int32(numberOfTabViewItem - 1))
+                                currentDocument.close()
+                            } else if (response == .alertSecondButtonReturn) { // 不保存
+                                tabStripModel.detachTabContents(at: Int32(numberOfTabViewItem - 1))
+                                currentDocument.close()
+                            } else { // 取消
+                                self.isCloseAllTabViewItem = false
+                            }
+                        } else {
+                            currentDocument.save(nil)
+                            currentDocument.close()
+                        }
+                        
+                        if isCloseAllTabViewItem {
+                            numberOfTabViewItem = numberOfTabViewItem - 1
+                            closeTabViewItem()
+                        }
+                    } else {
+                        tabStripModel.detachTabContents(at: Int32(numberOfTabViewItem - 1))
+                        currentDocument.close()
+                        if isCloseAllTabViewItem {
+                            numberOfTabViewItem = numberOfTabViewItem - 1
+                            closeTabViewItem()
+                        }
+                    }
                 } else {
                     tabStripModel.detachTabContents(at: Int32(numberOfTabViewItem - 1))
                     currentDocument.close()
@@ -139,10 +139,10 @@ import Cocoa
         if tabContents(at: Int32(index)) != nil {
             let currentDocument = tabContents(at: Int32(index)) as! KMMainDocument
             if (currentDocument.isHome == false) {
-//                currentDocument.mainViewController?.savePageNumberIfNeed()
-//                if let _isEdited = currentDocument.mainViewController?.listView.isEdited(), _isEdited, !currentDocument.isDocumentEdited {
-//                    currentDocument.updateChangeCount(.changeDone)
-//                }
+                currentDocument.mainViewController?.savePageNumberIfNeed()
+                if let _isEdited = currentDocument.mainViewController?.listView.isEdited(), _isEdited, !currentDocument.isDocumentEdited {
+                    currentDocument.updateChangeCount(.changeDone)
+                }
             }
             
             var canClose = false
@@ -178,39 +178,39 @@ import Cocoa
                         currentDocument.saveForWatermark()
                         canClose = false
                     }
-                } else if (currentDocument.pdfViewController != nil) {
-//                    if (currentDocument.mainViewController!.isPDFDocumentEdited || currentDocument.mainViewController!.needSave) {
-//                        if (isPrompt) {
-//                            let alert = NSAlert()
-//                            let message = "Do you want to save the changes made to the document “\(currentDocument.fileURL!.lastPathComponent)”?"
-//                            alert.messageText = message
-//                            alert.informativeText = NSLocalizedString("Your changes will be lost if you don’t save them.", comment: "")
-//                            alert.addButton(withTitle: NSLocalizedString("Save", comment: ""))
-//                            alert.addButton(withTitle: NSLocalizedString("Don‘t Save", comment: ""))
-//                            alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
-//                            let response = alert.runModal()
-//                            if (response == .alertFirstButtonReturn) { // 保存
-//                                if let home = self.tabContents(at: 0) as? KMMainDocument, home.isHome { // 标记 home 最近列表需要强制刷新
-//                                }
-//                                
-//                                currentDocument.save(nil)
-//                                currentDocument.close()
-//                                canClose = true
-//                            } else if (response == .alertSecondButtonReturn) { // 不保存
-//                                currentDocument.close()
-//                                canClose = true
-//                            } else { // 取消
-//                                canClose = false
-//                            }
-//                        } else {
-//                            currentDocument.save(nil)
-//                            currentDocument.close()
-//                            canClose = true
-//                        }
-//                    } else {
-//                        currentDocument.close()
-//                        canClose = true
-//                    }
+                } else if (currentDocument.mainViewController != nil) {
+                    if (currentDocument.mainViewController!.isPDFDocumentEdited || currentDocument.mainViewController!.needSave) {
+                        if (isPrompt) {
+                            let alert = NSAlert()
+                            let message = "Do you want to save the changes made to the document “\(currentDocument.fileURL!.lastPathComponent)”?"
+                            alert.messageText = message
+                            alert.informativeText = NSLocalizedString("Your changes will be lost if you don’t save them.", comment: "")
+                            alert.addButton(withTitle: NSLocalizedString("Save", comment: ""))
+                            alert.addButton(withTitle: NSLocalizedString("Don‘t Save", comment: ""))
+                            alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
+                            let response = alert.runModal()
+                            if (response == .alertFirstButtonReturn) { // 保存
+                                if let home = self.tabContents(at: 0) as? KMMainDocument, home.isHome { // 标记 home 最近列表需要强制刷新
+                                }
+                                
+                                currentDocument.save(nil)
+                                currentDocument.close()
+                                canClose = true
+                            } else if (response == .alertSecondButtonReturn) { // 不保存
+                                currentDocument.close()
+                                canClose = true
+                            } else { // 取消
+                                canClose = false
+                            }
+                        } else {
+                            currentDocument.save(nil)
+                            currentDocument.close()
+                            canClose = true
+                        }
+                    } else {
+                        currentDocument.close()
+                        canClose = true
+                    }
                 } else {
                     currentDocument.close()
                     canClose = true
@@ -218,7 +218,7 @@ import Cocoa
             }
             if (canClose) {
                 // 清理数据 [主要清空通知]
-//                currentDocument.mainViewController?.clearData()
+                currentDocument.mainViewController?.clearData()
                 self._trackCloseDocumentEvent()
             }
             return canClose
@@ -239,7 +239,7 @@ import Cocoa
             let currentDocument: KMMainDocument = document! as! KMMainDocument
             let index = self.tabStripModel.index(of: currentDocument)
             // 清空数据 [主要清理通知]
-//            currentDocument.mainViewController?.clearData()
+            currentDocument.mainViewController?.clearData()
             self._trackCloseDocumentEvent()
             if index != kNoTab {
                 self.tabStripModel.detachTabContents(at: index)
@@ -280,7 +280,7 @@ import Cocoa
             let index = tabStripModel.index(of: currentCloseDocument)
             tabStripModel.detachTabContents(at: index)
             // 清空数据 [主要清理通知]
-//            currentCloseDocument?.mainViewController?.clearData()
+            currentCloseDocument?.mainViewController?.clearData()
             currentCloseDocument?.close()
             currentCloseDocument = nil
             self._trackCloseDocumentEvent()

+ 1 - 1
PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindow.swift

@@ -32,7 +32,7 @@ class KMBrowserWindow: CTBrowserWindow {
         
         if let browser = (self.windowController as? KMBrowserWindowController)?.browser {
             let document = browser.activeTabContents() as? KMMainDocument
-//            document?.pdfViewController?.hideMeasureFloatingWindows()
+            document?.mainViewController?.hideMeasureFloatingWindows()
         }
     }
 }

+ 41 - 41
PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindowController+Actions.swift

@@ -23,11 +23,11 @@ extension KMBrowserWindowController {
 //        if useNativeFullScreen() {
 //            return interactionMode == .SKNormalMode || interactionMode == .SKPresentationMode
 //        } else {
-//        if let mainVc = (self.document as? KMMainDocument)?.mainViewController {
-//            if mainVc.canEnterFullscreen() == false {
-//                return false
-//            }
-//        }
+        if let mainVc = (self.document as? KMMainDocument)?.mainViewController {
+            if mainVc.canEnterFullscreen() == false {
+                return false
+            }
+        }
         let mode = self.interactionMode
         if mode == .fullScreen || mode == .legacyFullScreen {
             return false
@@ -43,11 +43,11 @@ extension KMBrowserWindowController {
             return false
         }
         
-//        if let mainVc = (self.document as? KMMainDocument)?.pdfViewController {
-//            if mainVc.canEnterPresentation() == false {
-//                return false
-//            }
-//        }
+        if let mainVc = (self.document as? KMMainDocument)?.mainViewController {
+            if mainVc.canEnterPresentation() == false {
+                return false
+            }
+        }
         return can
     }
     
@@ -84,43 +84,43 @@ extension KMBrowserWindowController {
         self.window?.isSwitchingFullScreen = true
         if wasInteractionMode == .legacyFullScreen {
             let doc = self.document as? KMMainDocument
-//            view = doc?.mainViewController?.pdfSplitView
-//            contentView = doc?.mainViewController?.centerContentView
+            view = doc?.mainViewController?.pdfSplitView
+            contentView = doc?.mainViewController?.centerContentView
         } else {
             let doc = self.document as? KMMainDocument
-//            view = doc?.mainViewController?.listView
-//            contentView = doc?.mainViewController?.readContentView
+            view = doc?.mainViewController?.listView
+            contentView = doc?.mainViewController?.readContentView
         }
 
         self.hideLeftSideWindow()
         self.hideRightSideWindow()
 
         let doc = self.document as? KMMainDocument
-//       let mainViewController = doc?.mainViewController
-//        
-//        mainViewController?.presentationTopViewController?.view.removeFromSuperview()
-//
-//        if let v = view {
-//            self.fadeOutFullScreenView(v)
-//            view?.frame = contentView?.bounds ?? .zero
-//            contentView?.addSubview(v)
-//            v.mas_makeConstraints { make in
-//                make?.left.mas_equalTo()(0)
-//                make?.right.mas_equalTo()(0)
-//                make?.top.mas_equalTo()(0)
-//                make?.bottom.mas_equalTo()(0)
-//            }
-//            (v as? CPDFListView)?.isPresentationMode = false
-//            (v as? CPDFListView)?.layoutDocumentView()
-//            (v as? CPDFListView)?.requiresDisplay()
-//            if (v as? CPDFListView)?.isEnterPresentationDrawMode() == true {
-//                (v as? CPDFListView)?.exitPresentationDrawMode()
-//            }
-//        }
-//
-//        if let mainVc = (self.document as? KMMainDocument)?.mainViewController {
-//            mainVc.exitFullscreenMode()
-//        }
+       let mainViewController = doc?.mainViewController
+        
+        mainViewController?.presentationTopViewController?.view.removeFromSuperview()
+
+        if let v = view {
+            self.fadeOutFullScreenView(v)
+            view?.frame = contentView?.bounds ?? .zero
+            contentView?.addSubview(v)
+            v.mas_makeConstraints { make in
+                make?.left.mas_equalTo()(0)
+                make?.right.mas_equalTo()(0)
+                make?.top.mas_equalTo()(0)
+                make?.bottom.mas_equalTo()(0)
+            }
+            (v as? CPDFListView)?.isPresentationMode = false
+            (v as? CPDFListView)?.layoutDocumentView()
+            (v as? CPDFListView)?.requiresDisplay()
+            if (v as? CPDFListView)?.isEnterPresentationDrawMode() == true {
+                (v as? CPDFListView)?.exitPresentationDrawMode()
+            }
+        }
+
+        if let mainVc = (self.document as? KMMainDocument)?.mainViewController {
+            mainVc.exitFullscreenMode()
+        }
         self.window?.isSwitchingFullScreen = false
 
         self.forceSubwindowsOnTop(false)
@@ -169,7 +169,7 @@ extension KMBrowserWindowController {
             return
         }
         
-        let mainVc = (self.document as? KMMainDocument)?.pdfViewController
+        let mainVc = (self.document as? KMMainDocument)?.mainViewController
         let mainWindow = fullScreenWindow.interactionParent
         let collectionBehavior = mainWindow?.collectionBehavior
         
@@ -187,7 +187,7 @@ extension KMBrowserWindowController {
         mainWindow?.alphaValue = 1.0
         mainWindow?.collectionBehavior = collectionBehavior!
         mainWindow?.display()
-//        mainWindow?.makeFirstResponder(mainVc?.listView)
+        mainWindow?.makeFirstResponder(mainVc?.listView)
         mainWindow?.recalculateKeyViewLoop()
         mainWindow?.delegate = self
         mainWindow?.makeKey()

+ 4 - 1
PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindowController.swift

@@ -151,6 +151,7 @@ import Cocoa
     
     func showSnapshots(setups: NSArray?) {
         let doc = self.document as? KMMainDocument
+        doc?.mainViewController?.showSnapshots(setups: setups)
 
     }
     
@@ -416,9 +417,11 @@ import Cocoa
         
         if let _userInfo = notification.userInfo, let _newContents = _userInfo[CTTabNewContentsUserInfoKey] as? KMMainDocument {
             _newContents.addWindowController(self)
-            
+            _newContents.mainViewController?.showMeasureFloatingWindowsIfNeed()
+
         }
         if let _userInfo = notification.userInfo, let _oldContents = _userInfo[CTTabContentsUserInfoKey] as? KMMainDocument {
+            _oldContents.mainViewController?.hideMeasureFloatingWindows()
 
         }
     }

+ 6 - 4
PDF Office/PDF Master/Class/ChromiumTabs/src/Tab Strip/CTTabStripModel.m

@@ -769,8 +769,9 @@ const int kNoTab = NSNotFound;
     for (TabContentsData *data in contentsData_) {
         CTTabContents *content = data->contents;
         KMMainDocument *doc = (KMMainDocument *)content;
-        if ([doc.pdfViewController isKindOfClass:[KMPDFViewController class]]) {
-            KMPDFViewController *mainViewCtrl = doc.pdfViewController;
+        if ([doc.mainViewController isKindOfClass:[KMMainViewController class]]) {
+            KMMainViewController *mainViewCtrl = doc.mainViewController;
+            isShow = mainViewCtrl.model.isShowQuickTour;
             if (isShow) break;
         }
         if ([doc.homeViewController isKindOfClass:[KMNHomeViewController class]]) {
@@ -812,8 +813,9 @@ const int kNoTab = NSNotFound;
     for (TabContentsData *data in contentsData_) {
         CTTabContents *content = data->contents;
         KMMainDocument *doc = (KMMainDocument *)content;
-        if ([doc.pdfViewController isKindOfClass:[KMPDFViewController class]]) {
-            KMPDFViewController *mainViewCtrl = doc.pdfViewController;
+        if ([doc.mainViewController isKindOfClass:[KMMainViewController class]]) {
+            KMMainViewController *mainViewCtrl = doc.mainViewController;
+            isShow = mainViewCtrl.model.isShowQuickTour;
             if (isShow) break;
         }
         if ([doc.homeViewController isKindOfClass:[KMNHomeViewController class]]) {

+ 1 - 79
PDF Office/PDF Master/Class/Common/Category/NSWindowController+KMExtension.swift

@@ -207,85 +207,7 @@ extension NSWindow {
         NotificationCenter.default.post(name: Self.didEnterInteractionModeNotification, object: self, userInfo: ["fullScreenWindow" : ""])
     }
     
-    func exitFullscreen() {
-//        let wasInteractionMode = self._interactionMode
-//        if self.canExitFullscreen() == false && self.canExitPresentation() == false {
-//            return
-//        }
-//
-//        if wasInteractionMode == .SKFullScreenMode {
-//            self.window?.toggleFullScreen(nil)
-//            return
-//        }
-//
-////        let backgroundColor = UserDefaults.standard.color(forKey: "SKBackgroundColorKey")
-//        var view: NSView?
-//        var contentView: NSView?
-////        PDFPage *page = [[self pdfView] currentPage];
-////
-//        self._mwcFlags.isSwitchingFullScreen = 1
-////
-////        if ([[findController view] window])
-////            [findController toggleAboveView:nil animate:NO];
-////
-//        if wasInteractionMode == .SKLegacyFullScreenMode {
-//            let doc = self.document as? KMMainDocument
-//            view = doc?.mainViewController?.pdfSplitView
-//            contentView = doc?.mainViewController?.centerContentView
-//        } else {
-//            let doc = self.document as? KMMainDocument
-//            view = doc?.mainViewController?.listView
-//            contentView = doc?.mainViewController?.readContentView
-//        }
-//
-//        self.hideLeftSideWindow()
-//        self.hideRightSideWindow()
-//
-//        // do this first, otherwise the navigation window may be covered by fadeWindow and then reveiled again, which looks odd
-////        [pdfView setInteractionMode:SKNormalMode];
-////
-//        // this should be done before exitPresentationMode to get a smooth transition
-//        if let v = view {
-//            self.fadeOutFullScreenView(v)
-//            view?.frame = contentView?.bounds ?? .zero
-//            contentView?.addSubview(v)
-//            v.mas_makeConstraints { make in
-//                make?.left.mas_equalTo()(0)
-//                make?.right.mas_equalTo()(0)
-//                make?.top.mas_equalTo()(0)
-//                make?.bottom.mas_equalTo()(0)
-//            }
-//
-//            (v as? CPDFListView)?.layoutDocumentView()
-//            (v as? CPDFListView)?.requiresDisplay()
-//        }
-//
-//        if let mainVc = (self.document as? KMMainDocument)?.mainViewController {
-//            mainVc.exitFullscreenMode()
-//        }
-////        [self applyPDFSettings:savedNormalSetup];
-////        [savedNormalSetup removeAllObjects];
-////
-////        [pdfView layoutDocumentView];
-////        [pdfView requiresDisplay];
-////
-////        if ([[[self pdfView] currentPage] isEqual:page] == NO)
-////            [[self pdfView] goToPage:page];
-////
-//        self._mwcFlags.isSwitchingFullScreen = 0
-//
-//        self.forceSubwindowsOnTop(false)
-////
-//        self._interactionMode = .SKNormalMode
-////        if (_isShowToolbar) {
-////            [self.toolbarViewController hiddenToolbar:NO];
-////        }
-//        self.fadeOutFullScreenWindow()
-//
-//        // the page number may have changed
-//        self.synchronizeWindowTitleWithDocumentName()
-//
-//        self.removeBlankingWindows()
+    func exitFullscreen() { 
     }
     
     // MARK: - fadeIn & fadeOut [淡入、淡出]

+ 4 - 4
PDF Office/PDF Master/Class/Common/OC/Property/KMInfoWindowController.swift

@@ -191,7 +191,7 @@ class KMInfoWindowController: NSWindowController {
         var physicalSize: Int64 = 0
         
         if let data = doc, data.isKind(of: KMMainDocument.self) {
-            if let pdfDoc = (data as! KMMainDocument).pdfViewController?.document {
+            if let pdfDoc = (data as! KMMainDocument).mainViewController?.document {
                 dictionary.addEntries(from: pdfDoc.documentAttributes())
                 dictionary.setValue(String(format: "%ld.%ld", pdfDoc.majorVersion, pdfDoc.minorVersion), forKey: KMInfoVersionKey)
                 dictionary.setValue(NSNumber(value: pdfDoc.pageCount), forKey: KMInfoPageCountKey)
@@ -246,7 +246,7 @@ class KMInfoWindowController: NSWindowController {
         }
         
         if (doc.isKind(of: KMMainDocument.self)) {
-            guard let pdfDocument = (doc as! KMMainDocument).pdfViewController?.document else {
+            guard let pdfDocument = (doc as! KMMainDocument).mainViewController?.document else {
                 return
             }
             if (pdfDocument.isEqual(to: sender.object)) {
@@ -261,7 +261,7 @@ class KMInfoWindowController: NSWindowController {
             if (self.editDictionary.count > 0) {
                 if let windowController = NSApp.mainWindow?.windowController, windowController.isKind(of: KMBrowserWindowController.self) {
                     let document = (windowController as! KMBrowserWindowController).document as? KMMainDocument
-                    var dic: NSMutableDictionary = NSMutableDictionary(dictionary: document?.pdfViewController?.document?.documentAttributes() ?? [:])
+                    var dic: NSMutableDictionary = NSMutableDictionary(dictionary: document?.mainViewController?.document?.documentAttributes() ?? [:])
                     var isSave = false
                     for key in self.editDictionary.allKeys {
                         if let data = key as? NSString, data.isEqual(to: KMInfoKeywordsStringKey) {
@@ -278,7 +278,7 @@ class KMInfoWindowController: NSWindowController {
                         }
                     }
                     if (isSave) {
-                        document?.pdfViewController?.document?.setDocumentAttributes(dic as? [CPDFDocumentAttribute : Any])
+                        document?.mainViewController?.document?.setDocumentAttributes(dic as? [CPDFDocumentAttribute : Any])
                         document?.save(nil)
                     }
                 }

+ 124 - 117
PDF Office/PDF Master/Class/Document/KMMainDocument.swift

@@ -34,7 +34,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
     
     static let kBundleDataFilename = "data"
     
-    var pdfViewController: KMPDFViewController?
+    var mainViewController: KMMainViewController?
     var homeViewController: KMNHomeViewController?
     
     var bookmarkSheetController: KMBookmarkSheetController?
@@ -50,22 +50,22 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
     var currentDocumentSetup: [String: Any] {
         get {
             var tempSetup: [String: Any] = [:]
-//            let tempMainSetup: [String: Any] = mainViewController?.currentSetup() ?? [:]
-//            let filePath = fileURL?.path ?? ""
-//            if filePath.count > 0{
-//                tempSetup.updateValue(filePath, forKey: KMDocumentSetupFileNameKey)
-//            }else {
-//                return tempSetup
-//            }
-//            if let alias = SKAlias.init(url: fileURL){
-//                if let data = alias.data{
-//                    tempSetup.updateValue(data as Any, forKey: KMDocumentSetupAliasKey)
-//                }
-//            }
-//            
-//            if tempSetup.count > 0 {
-//                tempSetup.merge(tempMainSetup) { (_, new) in new }
-//            }
+            let tempMainSetup: [String: Any] = mainViewController?.currentSetup() ?? [:]
+            let filePath = fileURL?.path ?? ""
+            if filePath.count > 0{
+                tempSetup.updateValue(filePath, forKey: KMDocumentSetupFileNameKey)
+            }else {
+                return tempSetup
+            }
+            if let alias = SKAlias.init(url: fileURL){
+                if let data = alias.data{
+                    tempSetup.updateValue(data as Any, forKey: KMDocumentSetupAliasKey)
+                }
+            }
+            
+            if tempSetup.count > 0 {
+                tempSetup.merge(tempMainSetup) { (_, new) in new }
+            }
             return tempSetup
         }
         set {
@@ -116,12 +116,12 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
                     if let data = params.first as? KMResult, data == .cancel {
                         if let shouldClose = params.last as? Bool, shouldClose {
                             DispatchQueue.main.async {
-
+                                self.mainViewController?.browserWindowController?.browser.windowDidBeginToClose()
                             }
                         }
                     } else {
                         DispatchQueue.main.async {
-
+                            self.mainViewController?.browserWindowController?.browser.windowDidBeginToClose()
                         }
                     }
                     return
@@ -194,19 +194,19 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
             browser.windowController.showWindow(self)
         }
         
-        pdfViewController = KMPDFViewController.init()
-        pdfViewController?.myDocument = self
+        mainViewController = KMMainViewController.init()
+        mainViewController?.myDocument = self
         self.mdFlags = MDFlags(exportOption: 0, exportUsingPanel: 0, gettingFileType: 0, convertingNotes: 0, needsPasswordToConvert: 0)
         
         if ((self.fileURL?.path) != nil) {
             let pdfDocument = CPDFDocument.init(url: URL(fileURLWithPath: self.fileURL!.path))
-            pdfViewController?.document = pdfDocument
+            mainViewController?.document = pdfDocument
         }
-        if pdfViewController?.document == nil {
+        if mainViewController?.document == nil {
             return
         }
-        self.view = pdfViewController?.view
-        
+        self.view = mainViewController?.view
+
         if let url = self.fileURL {
             AppSandboxFileAccess().persistPermissionURL(url as URL)
             let bookmarkData = try?url.bookmarkData(options: NSURL.BookmarkCreationOptions.withSecurityScope, includingResourceValuesForKeys: nil, relativeTo: nil)
@@ -223,7 +223,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
             let isfirstTab = (activeIndex == 0)
             if ishome && !isfirstTab { // 替换 【标签需要被替换】
                 self.addWindowController(currentWindowController!)
-//                self.mainViewController?.browserWindowController = currentWindowController
+                self.mainViewController?.browserWindowController = currentWindowController
                 
                 // 替换 document
                 currentWindowController?.browser.replaceTabContents(at: Int32(activeIndex), with: self)
@@ -247,10 +247,10 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
                         browser.windowController.showWindow(self)
                         browser.add(self, at: Int32()-1, inForeground: true)
                         self.addWindowController(browser.windowController)
-//                        self.mainViewController?.browserWindowController = browser.windowController as? KMBrowserWindowController
+                        self.mainViewController?.browserWindowController = browser.windowController as? KMBrowserWindowController
                 }else { // 正常拼接到后面
                     self.addWindowController(currentWindowController!)
-//                    self.mainViewController?.browserWindowController = currentWindowController
+                    self.mainViewController?.browserWindowController = currentWindowController
                     currentWindowController?.browser.add(self, at: Int32()-1, inForeground: true)
                 }
             }
@@ -310,10 +310,10 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
             self.save(nil)
         } else if (self.isDocumentEdited) {
             self.save(nil)
-//        } else if (mainViewController != nil) {
-//            if self.mainViewController!.isPDFDocumentEdited || self.mainViewController!.needSave {
-//                self.save(nil)
-//            }
+        } else if (mainViewController != nil) {
+            if self.mainViewController!.isPDFDocumentEdited || self.mainViewController!.needSave {
+                self.save(nil)
+            }
         }
 
         super.canClose(withDelegate: delegate, shouldClose: shouldCloseSelector, contextInfo: contextInfo)
@@ -332,7 +332,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
     }
     
     override func saveTo(_ sender: Any?) {
-        guard let pdfDoc = self.pdfViewController?.document else {
+        guard let pdfDoc = self.mainViewController?.listView.document else {
             NSSound.beep()
             return
         }
@@ -453,7 +453,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         if mainWindow != nil {
             let windowController = mainWindow!.windowController
             if windowController?.window?.screen?.isEqual(NSScreen.screens[0]) ?? false{
-//                return mainViewController?.interactionMode ?? .normal
+                return mainViewController?.interactionMode ?? .normal
             }
         }
         
@@ -476,12 +476,12 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
                     if let data = params.first as? KMResult, data == .cancel {
                         if let shouldClose = params.last as? Bool, shouldClose {
                             DispatchQueue.main.async {
-//                                self.mainViewController?.browserWindowController?.browser.windowDidBeginToClose()
+                                self.mainViewController?.browserWindowController?.browser.windowDidBeginToClose()
                             }
                         }
                     } else {
                         DispatchQueue.main.async {
-//                            self.mainViewController?.browserWindowController?.browser.windowDidBeginToClose()
+                            self.mainViewController?.browserWindowController?.browser.windowDidBeginToClose()
                         }
                     }
                     return
@@ -524,7 +524,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
     // MARK: Autosaving
     
     override func close() {
-//        mainViewController?.cancelMeasureType()
+        mainViewController?.cancelMeasureType()
         if self.isActive {
             if browser != nil {
                 var activeIndex = 0
@@ -583,9 +583,9 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
     }
     
     func needSaveWatermark() -> Bool {
-//        if let need = self.mainViewController?.saveWatermarkFlag {
-//            return need
-//        }
+        if let need = self.mainViewController?.saveWatermarkFlag {
+            return need
+        }
         return false
     }
     
@@ -597,7 +597,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
 
     func pdfChangedNotification(_ notification: Notification) -> Void {
         if !isHome {
-            let mainViewController = pdfViewController
+            let mainViewController = mainViewController
             var document: CPDFDocument!
             
             let dic = notification.object as? NSDictionary
@@ -666,7 +666,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
     }
     
     func setDataFromTmpData() {
-        guard let _document = self.pdfViewController?.document else {
+        guard let _document = self.mainViewController?.document else {
             return
         }
         if (_document.permissionsStatus != .owner) {
@@ -678,7 +678,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
             self.getPassword(&password, fileId: fileId)
             if (password != nil) {
                 self.isUnlockFromKeychain = true
-//                self.mainViewController?.model.password = password as String?
+                self.mainViewController?.model.password = password as String?
             }
         }
         
@@ -713,6 +713,8 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
             if (password != nil) {
                 self.isUnlockFromKeychain = true
                 document.unlock(withPassword: password! as String)
+                self.mainViewController?.model.password = password as String?
+                
             }
         }
     }
@@ -796,10 +798,10 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         KMPrint("convertNotes")
     }
     @IBAction func batchRemovePassWord(_ sender: Any?) {
-
+        self.mainViewController?.clickChildTool(type: .secure, index: 2)
     }
     @IBAction func batchRemovPrivatySecurity(_ sender: Any?) {
-
+        self.mainViewController?.removeOwnerPassword()
     }
     @IBAction func printPDFDocument(_ sender: Any?) {
 
@@ -835,8 +837,12 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
 
             switch type {
             case .bookmark:
-                let mainViewController = pdfViewController
-                
+                let mainViewController = mainViewController
+                if let page = mainViewController?.listView.currentPage() {
+                    let index: UInt = page.pageIndex()
+                    bookmark = KMBookmark.bookmark(url: self.fileURL!, pageIndex: index, label: label)
+                }
+
             case .setup: break
                 let setup = currentDocumentSetup
                 bookmark = KMBookmark.bookmark(setup: setup, label: label)
@@ -885,7 +891,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         if let data = self.pdfData {
             fileWrapper.addRegularFile(withContents: data, preferredFilename: aName + ".pdf")
         }
-        if let data = self.pdfViewController?.document?.string()?.data(using: .utf8) {
+        if let data = self.mainViewController?.document?.string()?.data(using: .utf8) {
             fileWrapper.addRegularFile(withContents: data, preferredFilename: Self.kBundleDataFilename + ".txt")
         }
         if let data = try?PropertyListSerialization.data(fromPropertyList: info, format: .xml, options: PropertyListSerialization.WriteOptions(0)) {
@@ -906,34 +912,35 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         }
         var success = true
         if !self.isHome {
-            if pdfViewController != nil {
-//                pdfViewController?.savePdfAlertView()
-                if pdfViewController?.document != nil {
-//                    self.pdfViewController?.commitEditingIfNeed()
+            if mainViewController != nil {
+                mainViewController?.savePdfAlertView()
+                if mainViewController?.document != nil {
+                    self.mainViewController?.commitEditingIfNeed()
+
                     
-//                    if (mainViewController!.needSave) {
-//                        if let options = self.mainViewController?.secureOptions, !options.isEmpty {
-//                            self.mainViewController!.document?.setDocumentAttributes(self.mainViewController?.documentAttribute)
-//                            success = self.mainViewController!.document!.write(to: url, withOptions: options)
-//                        } else if let flag = self.mainViewController?.removeSecureFlag, flag {
-//                            success = self.mainViewController!.document!.writeDecrypt(to: url)
-//                        } else {
-//                            if(mainViewController?.hasEnterRedact() == true) {
-//                                success = mainViewController?.redactController.redactPdfView.document?.write(to: url) ?? false
-//                            } else {
-//                                success = mainViewController!.document!.write(to: url)
-//                            }
-//                        }
-//                    } else {
-//                        if(mainViewController?.hasEnterRedact() == true) {
-//                            success = mainViewController?.redactController.redactPdfView.document?.write(to: url) ?? false
-//                        } else {
-//                            success = mainViewController!.document!.write(to: url)
-//                        }
-//                    }
-//                    self.mainViewController?.needSave = false
-//                    self.mainViewController?.clearSecureOptions()
-//                    self.mainViewController?.clearRemoveSecureFlag()
+                    if (mainViewController!.needSave) {
+                        if let options = self.mainViewController?.secureOptions, !options.isEmpty {
+                            self.mainViewController!.document?.setDocumentAttributes(self.mainViewController?.documentAttribute)
+                            success = self.mainViewController!.document!.write(to: url, withOptions: options)
+                        } else if let flag = self.mainViewController?.removeSecureFlag, flag {
+                            success = self.mainViewController!.document!.writeDecrypt(to: url)
+                        } else {
+                            if(mainViewController?.hasEnterRedact() == true) {
+                                success = mainViewController?.redactController.redactPdfView.document?.write(to: url) ?? false
+                            } else {
+                                success = mainViewController!.document!.write(to: url)
+                            }
+                        }
+                    } else {
+                        if(mainViewController?.hasEnterRedact() == true) {
+                            success = mainViewController?.redactController.redactPdfView.document?.write(to: url) ?? false
+                        } else {
+                            success = mainViewController!.document!.write(to: url)
+                        }
+                    }
+                    self.mainViewController?.needSave = false
+                    self.mainViewController?.clearSecureOptions()
+                    self.mainViewController?.clearRemoveSecureFlag()
                 }
             }
         } else {
@@ -950,9 +957,9 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         if success && isNewCreated && NSDocument.SaveOperationType.saveAsOperation == saveOperation {
             isNewCreated = false
         }
-//        if mainViewController != nil {
-//            mainViewController?.savePdfFinishAlertView()
-//        }
+        if mainViewController != nil {
+            mainViewController?.savePdfFinishAlertView()
+        }
     }
     
     private func _km_saveForWatermark(openAccessoryView: Bool = true, subscribeDidClick: (()->Void)? = nil, callback:@escaping (_ needSave: Bool, _ param: Any...)->Void) {
@@ -974,7 +981,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
                     }
                     
                     if (isWaterMarkExport) {
-                        guard let _document = self.pdfViewController?.document else {
+                        guard let _document = self.mainViewController?.document else {
                             callback(false, KMResult.failure)
                             return
                         }
@@ -992,18 +999,18 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
                                     callback(false, KMResult.cancel, true)
                                     return
                                 }
-//                                guard let _url = KMTools.saveWatermarkDocument(document: _document, to: url!, secureOptions: self.mainViewController?.secureOptions, documentAttribute: self.mainViewController?.documentAttribute,removePWD: self.mainViewController!.removeSecureFlag) else {
-//                                    callback(false, KMResult.failure)
-//                                    return
-//                                }
-//                                callback(false, KMResult.success)
-//                                if (isOpen) {
-//                                    NSDocumentController.shared.km_safe_openDocument(withContentsOf: _url, display: true) { _, _, _ in
-//                                        
-//                                    }
-//                                } else {
-//                                    NSWorkspace.shared.activateFileViewerSelecting([_url])
-//                                }
+                                guard let _url = KMTools.saveWatermarkDocument(document: _document, to: url!, secureOptions: self.mainViewController?.secureOptions, documentAttribute: self.mainViewController?.documentAttribute,removePWD: self.mainViewController!.removeSecureFlag) else {
+                                    callback(false, KMResult.failure)
+                                    return
+                                }
+                                callback(false, KMResult.success)
+                                if (isOpen) {
+                                    NSDocumentController.shared.km_safe_openDocument(withContentsOf: _url, display: true) { _, _, _ in
+                                        
+                                    }
+                                } else {
+                                    NSWorkspace.shared.activateFileViewerSelecting([_url])
+                                }
                             }
                         }
                         return
@@ -1046,17 +1053,17 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         if self._canAttachNotesForType(typeName) {
             matrix?.isHidden = false
             let ws = NSWorkspace.shared
-//            let isLocked = self.mainViewController?.listView.document.isLocked ?? false
-//            let allowsPrinting = self.mainViewController?.listView.document.allowsPrinting ?? false
-//            if ws.type(typeName, conformsToType: KMPDFDocumentType) && isLocked == false && allowsPrinting {
-//                (matrix?.cell(withTag: KMExportOption.withEmbeddedNotes.rawValue))?.isEnabled = true
-//            } else {
-//                (matrix?.cell(withTag: KMExportOption.withEmbeddedNotes.rawValue))?.isEnabled = false
-//                if let data = self.mdFlags?.exportOption, data == KMExportOption.withEmbeddedNotes.rawValue {
-//                    self.mdFlags?.exportOption = UInt32(KMExportOption.default.rawValue)
-//                    matrix?.selectCell(withTag: KMExportOption.default.rawValue)
-//                }
-//            }
+            let isLocked = self.mainViewController?.listView.document.isLocked ?? false
+            let allowsPrinting = self.mainViewController?.listView.document.allowsPrinting ?? false
+            if ws.type(typeName, conformsToType: KMPDFDocumentType) && isLocked == false && allowsPrinting {
+                (matrix?.cell(withTag: KMExportOption.withEmbeddedNotes.rawValue))?.isEnabled = true
+            } else {
+                (matrix?.cell(withTag: KMExportOption.withEmbeddedNotes.rawValue))?.isEnabled = false
+                if let data = self.mdFlags?.exportOption, data == KMExportOption.withEmbeddedNotes.rawValue {
+                    self.mdFlags?.exportOption = UInt32(KMExportOption.default.rawValue)
+                    matrix?.selectCell(withTag: KMExportOption.default.rawValue)
+                }
+            }
         } else {
             matrix?.isHidden = true
         }
@@ -1119,7 +1126,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         if self.isHome {
             return NSPrintOperation()
         }
-        let documentURL = self.pdfViewController?.document?.documentURL
+        let documentURL = self.mainViewController?.document?.documentURL
         if documentURL == nil {
             return NSPrintOperation()
         }
@@ -1171,7 +1178,7 @@ extension KMMainDocument {
                 return self.isDocumentEdited
             }
             
-            guard let mainVC = self.pdfViewController else {
+            guard let mainVC = self.mainViewController else {
                 return false
             }
 //            return mainVC.isPDFDocumentEdited || mainVC.needSave
@@ -1181,7 +1188,7 @@ extension KMMainDocument {
             if self.isHome {
                 return false
             }
-            guard let doc = self.pdfViewController?.document else {
+            guard let doc = self.mainViewController?.document else {
                 return false
             }
             let allowsPrinting = doc.allowsPrinting
@@ -1418,18 +1425,18 @@ extension KMMainDocument: SKPDFSynchronizerDelegate {
     }
     
     func synchronizer(_ synchronizer: SKPDFSynchronizer!, foundLocation point: NSPoint, atPageIndex pageIndex: UInt, options: Int) {
-//        guard let pdfDoc = self.mainViewController?.document else { return }
-//        if pageIndex < pdfDoc.pageCount {
-//            if let page = pdfDoc.page(at: pageIndex) {
-//                var adjustedPoint = point
-//                if options & SKPDFSynchronizerFlippedMask != 0 {
-//                    let mediaBox = page.bounds(for: .mediaBox)
-//                    adjustedPoint.y = NSMaxY(mediaBox) - adjustedPoint.y
-//                }
-//                
-//                self.mainViewController?.listView.displayLine(at: adjustedPoint, inPageAtIndex: Int(pageIndex), showReadingBar: options & SKPDFSynchronizerShowReadingBarMask != 0)
-//            }
-//        }
+        guard let pdfDoc = self.mainViewController?.document else { return }
+        if pageIndex < pdfDoc.pageCount {
+            if let page = pdfDoc.page(at: pageIndex) {
+                var adjustedPoint = point
+                if options & SKPDFSynchronizerFlippedMask != 0 {
+                    let mediaBox = page.bounds(for: .mediaBox)
+                    adjustedPoint.y = NSMaxY(mediaBox) - adjustedPoint.y
+                }
+                
+                self.mainViewController?.listView.displayLine(at: adjustedPoint, inPageAtIndex: Int(pageIndex), showReadingBar: options & SKPDFSynchronizerShowReadingBarMask != 0)
+            }
+        }
     }
 }
 

+ 14 - 13
PDF Office/PDF Master/Class/Home/ViewController/customViewController/KMDesignButton.xib

@@ -1,11 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMDesignButton" customModule="PDF_Master" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMDesignButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
                 <outlet property="button" destination="Zns-K7-6eD" id="VMf-U0-mvN"/>
                 <outlet property="imageButtonBox" destination="cvM-Bd-5JV" id="jfg-8m-FSC"/>
@@ -84,14 +85,14 @@
             </constraints>
             <point key="canvasLocation" x="68" y="67.5"/>
         </customView>
-        <box boxType="custom" borderWidth="0.0" title="Box" id="Y8j-9c-Qz0" customClass="KMMoveBox" customModule="PDF_Master" customModuleProvider="target">
+        <box boxType="custom" borderWidth="0.0" title="Box" id="Y8j-9c-Qz0" customClass="KMMoveBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <rect key="frame" x="0.0" y="0.0" width="80" height="32"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <view key="contentView" id="V2P-Be-4EP">
                 <rect key="frame" x="0.0" y="0.0" width="80" height="32"/>
                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                 <subviews>
-                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6nN-bR-GkZ">
+                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6nN-bR-GkZ">
                         <rect key="frame" x="22" y="8" width="37" height="16"/>
                         <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="td8-Mq-qY9">
                             <font key="font" metaFont="system"/>
@@ -107,7 +108,7 @@
             </constraints>
             <point key="canvasLocation" x="-114" y="158"/>
         </box>
-        <box boxType="custom" borderWidth="0.0" title="Box" id="cvM-Bd-5JV" customClass="KMMoveBox" customModule="PDF_Master" customModuleProvider="target">
+        <box boxType="custom" borderWidth="0.0" title="Box" id="cvM-Bd-5JV" customClass="KMMoveBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
             <autoresizingMask key="autoresizingMask"/>
             <view key="contentView" id="MNI-fR-ZxO">
@@ -128,7 +129,7 @@
             </view>
             <point key="canvasLocation" x="-114" y="264"/>
         </box>
-        <box boxType="custom" cornerRadius="4" title="Box" id="Xrh-vh-9yg" customClass="KMMoveBox" customModule="PDF_Master" customModuleProvider="target">
+        <box boxType="custom" cornerRadius="4" title="Box" id="Xrh-vh-9yg" customClass="KMMoveBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <rect key="frame" x="0.0" y="0.0" width="412" height="2"/>
             <autoresizingMask key="autoresizingMask"/>
             <view key="contentView" id="JIa-kj-5wJ">
@@ -149,7 +150,7 @@
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="btn_radio_sel_on" id="WaL-nA-4aZ"/>
                 </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7iI-P1-LQl">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7iI-P1-LQl">
                     <rect key="frame" x="14" y="28" width="37" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="T46-2A-MTS">
                         <font key="font" metaFont="system"/>
@@ -179,7 +180,7 @@
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="btn_radio_sel_on" id="TeJ-Rb-Oeq"/>
                 </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xOY-wx-EuE">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xOY-wx-EuE">
                     <rect key="frame" x="42" y="27" width="37" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="vVz-sh-jqf">
                         <font key="font" metaFont="system"/>
@@ -208,7 +209,7 @@
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="btn_radio_sel_on" id="ZBq-r6-PRf"/>
                 </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rYG-AJ-viM">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rYG-AJ-viM">
                     <rect key="frame" x="141" y="16" width="37" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="flh-Ms-wGl">
                         <font key="font" metaFont="system"/>
@@ -237,7 +238,7 @@
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="btn_radio_sel_on" id="dxm-Kd-sDS"/>
                 </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3L5-Tt-c0P">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3L5-Tt-c0P">
                     <rect key="frame" x="141" y="44" width="37" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="pdi-kB-OUk">
                         <font key="font" metaFont="system"/>
@@ -254,7 +255,7 @@
             </constraints>
             <point key="canvasLocation" x="554" y="439"/>
         </customView>
-        <box boxType="custom" borderWidth="0.0" title="Box" id="Dan-L1-vKC" customClass="KMMoveBox" customModule="PDF_Master" customModuleProvider="target">
+        <box boxType="custom" borderWidth="0.0" title="Box" id="Dan-L1-vKC" customClass="KMMoveBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <rect key="frame" x="0.0" y="0.0" width="65" height="22"/>
             <autoresizingMask key="autoresizingMask"/>
             <view key="contentView" id="tPq-1S-9CW">
@@ -269,7 +270,7 @@
                         </constraints>
                         <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="KMRadioButtonUnSelect" id="b2G-WY-aoL"/>
                     </imageView>
-                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Rcq-Ab-TwC">
+                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Rcq-Ab-TwC">
                         <rect key="frame" x="22" y="3" width="37" height="16"/>
                         <textFieldCell key="cell" lineBreakMode="truncatingTail" title="Label" id="laz-qX-1sa">
                             <font key="font" metaFont="system"/>

+ 7 - 6
PDF Office/PDF Master/Class/Home/ViewController/customViewController/KMDesignSelect.xib

@@ -1,11 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMDesignSelect" customModule="PDF_Master" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMDesignSelect" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
                 <outlet property="horizontalPadding_spacing" destination="zXq-bs-uyE" id="lj0-Ik-ovU"/>
                 <outlet property="imageView" destination="pY7-Ye-k9N" id="gmc-pp-NfK"/>
@@ -24,7 +25,7 @@
             <rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
-                <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="Xk1-7q-unw" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
+                <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="Xk1-7q-unw" customClass="KMBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
                     <rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
                     <view key="contentView" id="WPX-6N-vCM">
                         <rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
@@ -47,9 +48,9 @@
                 <rect key="frame" x="0.0" y="0.0" width="317" height="21"/>
                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                 <subviews>
-                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aHg-43-XTf">
+                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aHg-43-XTf">
                         <rect key="frame" x="0.0" y="0.0" width="287" height="21"/>
-                        <textFieldCell key="cell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="c66-BA-jKX" customClass="KMSelectCell" customModule="PDF_Master" customModuleProvider="target">
+                        <textFieldCell key="cell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="c66-BA-jKX" customClass="KMSelectCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                             <font key="font" usesAppearanceFont="YES"/>
                             <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>

+ 11 - 11
PDF Office/PDF Master/Class/Home/ViewController/customViewController/KMNotificationVC.xib

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMNotificationVC" customModule="PDF_Office" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMNotificationVC" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
                 <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
             </connections>
@@ -45,7 +45,7 @@
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="btn_radio_sel_on" id="J0f-JC-Rma"/>
                 </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BSC-SG-7Cc">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BSC-SG-7Cc">
                     <rect key="frame" x="44" y="94" width="400" height="22"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="22" id="FjH-h2-yVS"/>
@@ -56,7 +56,7 @@
                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                     </textFieldCell>
                 </textField>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GKT-DI-8NL">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GKT-DI-8NL">
                     <rect key="frame" x="44" y="64" width="400" height="22"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="22" id="rbB-nM-v17"/>
@@ -73,7 +73,7 @@
                         <rect key="frame" x="1" y="1" width="106" height="30"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZFF-hU-3bu">
+                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZFF-hU-3bu">
                                 <rect key="frame" x="35" y="7" width="37" height="16"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="aGZ-XF-Uxg">
                                     <font key="font" metaFont="system"/>
@@ -101,14 +101,14 @@
                 </button>
                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ke3-BJ-QX4">
                     <rect key="frame" x="450" y="104" width="12" height="12"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="12" id="aWl-1B-fbj"/>
-                        <constraint firstAttribute="width" constant="12" id="chu-V3-i7R"/>
-                    </constraints>
                     <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" image="CPDFListViewImageNameCursorsFork" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="TmO-bM-5sp">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
                     </buttonCell>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="12" id="aWl-1B-fbj"/>
+                        <constraint firstAttribute="width" constant="12" id="chu-V3-i7R"/>
+                    </constraints>
                 </button>
             </subviews>
             <constraints>
@@ -144,7 +144,7 @@
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="jeb-WD-pEH"/>
                 </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RuW-9Q-A9X">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RuW-9Q-A9X">
                     <rect key="frame" x="38" y="52" width="324" height="22"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="22" id="K6P-uR-Qog"/>

PDF Office/PDF Master/Class/Home/WindowController/KMDeviceBrowserWindowController/KMDeviceBrowserWindowController.swift → PDF Office/PDF Master/Class/KMDeviceBrowserWindowController/KMDeviceBrowserWindowController.swift


PDF Office/PDF Master/Class/Home/WindowController/KMDeviceBrowserWindowController/KMDeviceBrowserWindowController.xib → PDF Office/PDF Master/Class/KMDeviceBrowserWindowController/KMDeviceBrowserWindowController.xib


+ 0 - 4
PDF Office/PDF Master/Class/KMLightMember/Controller/AccountInfo/View/KMAccountInfoView.swift

@@ -65,7 +65,6 @@ class KMAccountInfoView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         
         self.closeBox.moveCallback = { [weak self] (mouseEntered, mouseBox) in
             if mouseEntered {
@@ -77,7 +76,6 @@ class KMAccountInfoView: BaseXibView {
     }
     
     func updateUI() {
-//        super.updateUI()
         
         self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
         self.titleLabel.font = NSFont.SFProTextSemiboldFont(20.0)
@@ -125,7 +123,6 @@ class KMAccountInfoView: BaseXibView {
     }
     
     func reloadData() {
-//        super.reloadData()
         
         if self.userInfo != nil {
             self.accountLabel.stringValue = userInfo!.email
@@ -205,7 +202,6 @@ class KMAccountInfoView: BaseXibView {
     }
     
     func updateLanguage() {
-//        super.updateLanguage()
         
         self.purchaseInfoButton.title = NSLocalizedString("Order Information", comment: "")
         

+ 0 - 3
PDF Office/PDF Master/Class/KMLightMember/Controller/Cancellation/View/KMCancellationSuccessView.swift

@@ -26,7 +26,6 @@ class KMCancellationSuccessView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         
         self.closeBox.moveCallback = { [weak self] (mouseEntered, mouseBox) in
             if mouseEntered {
@@ -55,12 +54,10 @@ class KMCancellationSuccessView: BaseXibView {
     }
         
     func reloadData() {
-//        super.reloadData()
         
     }
     
     func updateLanguage() {
-//        super.updateLanguage()
         self.titleLabel.stringValue = NSLocalizedString("Cancellation Submitted", comment: "")
         self.subTitleLabel.stringValue = NSLocalizedString("Your account will be canceled within 3 working days and there is no need to submit the application for cancellation again", comment: "")
         self.doneButtonVC.stringValue = NSLocalizedString("OK", comment: "")

+ 0 - 4
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/ComparativeView/KMComparativeOutlineView.swift

@@ -22,7 +22,6 @@ class KMComparativeOutlineView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         
         self.scrollView.backgroundColor(NSColor.km_init(hex: "#F2F9FF"))
         
@@ -32,7 +31,6 @@ class KMComparativeOutlineView: BaseXibView {
     }
     
     func reloadData() {
-//        super.reloadData()
         KMComparativeManager.manager.fetchData { [weak self] result in
             KMPrint(result)
             if result != nil {
@@ -48,7 +46,6 @@ class KMComparativeOutlineView: BaseXibView {
     }
     
     func updateUI() {
-//        super.updateUI()
         
         self.optionTitleLabel.textColor = NSColor.km_init(hex: "#616469")
         self.optionTitleLabel.font = NSFont.SFProTextBoldFont(14.0)
@@ -58,7 +55,6 @@ class KMComparativeOutlineView: BaseXibView {
     }
     
     func updateLanguage() {
-//        super.updateLanguage()
         
         self.optionTitleLabel.stringValue = NSLocalizedString("Unregistered", comment: "")
         self.optionTitleLabel2.stringValue = NSLocalizedString("Registered", comment: "")

+ 0 - 1
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/KMComparativeView.swift

@@ -102,7 +102,6 @@ class KMComparativeView: BaseXibView {
     var isSubscription: Bool = false
     
     func setup() {
-//        super.setup()
         
         // 创建布局对象
         let layout = NSCollectionViewFlowLayout()

+ 0 - 4
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginInputPasswordView.swift

@@ -48,7 +48,6 @@ class KMLoginInputPasswordView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         
         self.titleLabel.textColor = NSColor.km_init(hex: "#252629")
         self.titleLabel.font = NSFont.SFProTextSemiboldFont(20.0)
@@ -91,7 +90,6 @@ class KMLoginInputPasswordView: BaseXibView {
     }
     
     func reloadData() {
-//        super.reloadData()
         
         if self.model.secure {
             self.showButton.image = NSImage(named: "icon_btn_hide")
@@ -116,7 +114,6 @@ class KMLoginInputPasswordView: BaseXibView {
     }
     
     func updateUI() {
-//        super.updateUI()
        
         //password
         self.passwordContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
@@ -133,7 +130,6 @@ class KMLoginInputPasswordView: BaseXibView {
     }
     
     func updateLanguage() {
-//        super.updateLanguage()
         
         self.titleLabel.stringValue = NSLocalizedString("Log In", comment: "")
         

+ 0 - 1
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMLoginLeftImageView.swift

@@ -28,7 +28,6 @@ class KMLoginLeftImageView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         
 //        self.subscriptionButton.setTitleColor(NSColor.km_init(hex: "#3F8FF6"))
 //        self.subscriptionButton.font = NSFont.SFProTextSemiboldFont(12.0)

+ 0 - 3
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterSuccessView.swift

@@ -34,7 +34,6 @@ class KMRegisterSuccessView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         
         
 //        self.imageView.backgroundColor(NSColor.km_init(hex: "#D9D9D9"))
@@ -69,7 +68,6 @@ class KMRegisterSuccessView: BaseXibView {
     }
     
     func reloadData() {
-//        super.reloadData()
         if KMLightMemberManager.manager.purchaseState == .subscription {
             self.doneButton.isEnabled = false
             self.doneButton.title = NSLocalizedString("Already Subscribed", comment: "")
@@ -84,7 +82,6 @@ class KMRegisterSuccessView: BaseXibView {
     }
     
     func updateLanguage() {
-//        super.updateLanguage()
         self.label1.stringValue = NSLocalizedString("AI robot", comment: "")
         self.label2.stringValue = NSLocalizedString("Unlimited Conversion", comment: "")
         self.label3.stringValue = NSLocalizedString("Save without Watermark", comment: "")

+ 0 - 3
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMRegisterView.swift

@@ -45,7 +45,6 @@ class KMRegisterView: BaseXibView {
     
         
     func setup() {
-//        super.setup()
         //初始化数据
         self.signInTextView.delegate = self
         self.signInTextView.isEditable = false
@@ -88,7 +87,6 @@ class KMRegisterView: BaseXibView {
     }
     
     func updateLanguage() {
-//        super.updateLanguage()
         
         self.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
         
@@ -177,7 +175,6 @@ class KMRegisterView: BaseXibView {
     }
     
     func reloadData() {
-//        super.reloadData()
         KMLightMemberManager.manager.updatePopupShownToday(isPop: true)
         
         self.passwordTextField.stringValue = self.model.password

+ 6 - 10
PDF Office/PDF Master/Class/KMLightMember/Controller/Login&Register/View/KMResetPasswordView.swift

@@ -45,7 +45,6 @@ class KMResetPasswordView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         self.model.logType = .resetPassword
         
         self.titleLabel.font = NSFont.SFProTextSemiboldFont(20.0)
@@ -85,7 +84,6 @@ class KMResetPasswordView: BaseXibView {
     }
     
     func updateUI() {
-//        super.updateUI()
         //password
         self.passwordContentView.border(NSColor.km_init(hex: "#DFE1E5"), 1, 4)
         self.passwordTextField.textColor = NSColor.km_init(hex: "#252629")
@@ -114,7 +112,6 @@ class KMResetPasswordView: BaseXibView {
     }
     
     func reloadData() {
-//        super.reloadData()
         
         self.passwordTextField.stringValue = self.model.password
         self.passwordSecureTextField.stringValue = self.model.password
@@ -164,15 +161,14 @@ class KMResetPasswordView: BaseXibView {
         self.rePasswordAlertLabel.stringValue = NSLocalizedString(KMRequestServerErrorCodeType.typeOfMessage(type: self.model.rePasswordAlertType), comment: "")
     }
     
-//    override func resetData() {
-//        super.resetData()
-//        self.model.password = ""
-//        self.model.rePassword = ""
-//        self.reloadData()
-//    }
+     func resetData() {
+    
+        self.model.password = ""
+        self.model.rePassword = ""
+        self.reloadData()
+    }
     
     func updateLanguage() {
-//        super.updateLanguage()
         
         self.titleLabel.stringValue = NSLocalizedString("Reset Password", comment: "")
         

+ 2 - 4
PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMLightMemberAlertView.swift

@@ -27,13 +27,12 @@ class KMLightMemberAlertView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         self.result = Result(code: 0)
 
     }
     
     func updateUI() {
-//        super.updateUI()
+
         self.contentView.backgroundColor(NSColor.km_init(hex: "#FDC7C6"))
         
         self.titleLabel.font = NSFont.SFProTextRegularFont(14.0)
@@ -41,7 +40,6 @@ class KMLightMemberAlertView: BaseXibView {
     }
     
     func reloadData() {
-//        super.reloadData()
         
         if result.code == 200 || result.code == 0 {
             self.contentView.isHidden = true
@@ -90,6 +88,6 @@ class KMLightMemberAlertView: BaseXibView {
         }, completionHandler: nil)
     }
     func updateLanguage() {
-//        super.updateLanguage()
+
     }
 }

+ 0 - 3
PDF Office/PDF Master/Class/KMLightMember/Controller/VerificationCode/View/KMVerificationCodeView.swift

@@ -108,7 +108,6 @@ class KMVerificationCodeView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         
         self.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
         
@@ -209,7 +208,6 @@ class KMVerificationCodeView: BaseXibView {
     }
     
     func reloadData() {
-//        super.reloadData()
         
         if inputType == .accountInfo {
             self.closeButton.isHidden = false
@@ -237,7 +235,6 @@ class KMVerificationCodeView: BaseXibView {
     }
     
     func updateLanguage() {
-//        super.updateLanguage()
         
         if self.verifyCodeType == .unknown {
             self.titleLabel.stringValue = ""

+ 1 - 15
PDF Office/PDF Master/Class/KMLightMember/Tools/Alert/KMPurchaseAlertView.swift

@@ -16,8 +16,7 @@ class KMPurchaseAlertView: BaseXibView {
     
     var event: Any? = nil
     deinit {
-//        self.removeNotification()
-        KMPrint("KMPurchaseAlertView delloc")
+         KMPrint("KMPurchaseAlertView delloc")
     }
     
     override func draw(_ dirtyRect: NSRect) {
@@ -52,19 +51,6 @@ class KMPurchaseAlertView: BaseXibView {
         self.titleLabel.textColor = NSColor.km_init(hex: "#FFFFFF")
         self.titleLabel.font = NSFont.SFProTextRegularFont(14)
     }
-    
-//    override func addNotification() {
-//        event = NSEvent.addLocalMonitorForEvents(matching: .any) { NSEvent in
-//            return nil
-//        }
-//    }
-    
-//    override func removeNotification() {
-//        if self.event != nil {
-//            NSEvent.removeMonitor(self.event as Any)
-//            self.event = nil
-//        }
-//    }
 }
 
 //MARK: 时间拦截

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/AutoFlow/KMAutoFlowOptionsSheetController.xib

@@ -27,7 +27,7 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="196" y="240" width="296" height="235"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
             <view key="contentView" id="se5-gp-TjO">
                 <rect key="frame" x="0.0" y="0.0" width="296" height="235"/>
                 <autoresizingMask key="autoresizingMask"/>

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Compare/ViewController/ContentComplete/KMCompareContentWindowController.xib

@@ -18,7 +18,7 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="196" y="240" width="983" height="652"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
             <view key="contentView" id="se5-gp-TjO">
                 <rect key="frame" x="0.0" y="0.0" width="983" height="652"/>
                 <autoresizingMask key="autoresizingMask"/>

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/KMBookmark/Model/KMBookmark.swift

@@ -289,7 +289,7 @@ class KMBookmark: NSObject {
                 NSApp.presentError(error!)
             } else {
                 if self.pageIndex > 1 {
-//                    (document as! KMMainDocument).mainViewController?.setPageNumber = self.pageIndex + 1
+                    (document as! KMMainDocument).mainViewController?.setPageNumber = self.pageIndex + 1
                 }
             }
         })

+ 72 - 72
PDF Office/PDF Master/Class/PDFTools/Measure/Side/KMMeasureSideVC.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="Named colors" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -70,20 +70,20 @@
             <rect key="frame" x="0.0" y="0.0" width="481" height="661"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="k30-Q9-hNL" customClass="KMClipView">
-                <rect key="frame" x="0.0" y="0.0" width="481" height="661"/>
+                <rect key="frame" x="0.0" y="0.0" width="466" height="661"/>
                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                 <subviews>
                     <view translatesAutoresizingMaskIntoConstraints="NO" id="hrB-1R-XwJ">
-                        <rect key="frame" x="0.0" y="-79" width="481" height="740"/>
+                        <rect key="frame" x="0.0" y="-84" width="466" height="745"/>
                         <subviews>
                             <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="dV9-GQ-3pk">
-                                <rect key="frame" x="16" y="660" width="449" height="80"/>
+                                <rect key="frame" x="16" y="665" width="434" height="80"/>
                                 <view key="contentView" id="KK3-7C-TZH">
-                                    <rect key="frame" x="0.0" y="0.0" width="449" height="80"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="434" height="80"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                     <subviews>
                                         <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rz1-qu-YbV">
-                                            <rect key="frame" x="155" y="10" width="140" height="60"/>
+                                            <rect key="frame" x="147" y="10" width="140" height="60"/>
                                             <constraints>
                                                 <constraint firstAttribute="width" constant="140" id="EEd-wg-jEP"/>
                                                 <constraint firstAttribute="height" constant="60" id="l6D-l4-Nrm"/>
@@ -102,10 +102,10 @@
                                 <color key="fillColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </box>
                             <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="db4-tx-GKU">
-                                <rect key="frame" x="16" y="616" width="449" height="32"/>
+                                <rect key="frame" x="16" y="621" width="434" height="32"/>
                                 <subviews>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="KJb-7Z-NB6">
-                                        <rect key="frame" x="145" y="0.0" width="160" height="32"/>
+                                        <rect key="frame" x="137" y="0.0" width="160" height="32"/>
                                         <subviews>
                                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="R0Y-iB-Whq">
                                                 <rect key="frame" x="0.0" y="0.0" width="40" height="32"/>
@@ -245,9 +245,9 @@
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="stF-lk-Px9">
-                                <rect key="frame" x="16" y="327" width="449" height="64"/>
+                                <rect key="frame" x="16" y="329" width="434" height="64"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZP8-hL-mPu">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZP8-hL-mPu">
                                         <rect key="frame" x="-2" y="34" width="52" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="20" id="o0c-hd-VGs"/>
@@ -258,8 +258,8 @@
                                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="g8X-5L-1kw" customClass="KMComboBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                        <rect key="frame" x="377" y="0.0" width="72" height="23"/>
+                                    <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="g8X-5L-1kw" customClass="KMComboBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                                        <rect key="frame" x="361" y="1" width="73" height="23"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="69" id="Vr5-nw-ODj"/>
                                         </constraints>
@@ -282,7 +282,7 @@
                                         </connections>
                                     </comboBox>
                                     <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JhQ-39-0CI">
-                                        <rect key="frame" x="-2" y="-1" width="373" height="23"/>
+                                        <rect key="frame" x="-2" y="-1" width="358" height="23"/>
                                         <sliderCell key="cell" state="on" alignment="left" minValue="0.5" maxValue="18" doubleValue="0.5" tickMarkPosition="above" sliderType="linear" id="hVk-ke-xNd"/>
                                         <connections>
                                             <action selector="thicknessSliderAction:" target="-2" id="ZWF-tz-w9A"/>
@@ -302,12 +302,12 @@
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="sv1-ye-km4">
-                                <rect key="frame" x="16" y="223" width="449" height="104"/>
+                                <rect key="frame" x="16" y="225" width="434" height="104"/>
                                 <subviews>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="QPc-Pt-nlu">
-                                        <rect key="frame" x="0.0" y="72" width="449" height="32"/>
+                                        <rect key="frame" x="0.0" y="72" width="434" height="32"/>
                                         <subviews>
-                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YdU-MQ-e0v">
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YdU-MQ-e0v">
                                                 <rect key="frame" x="-2" y="8" width="64" height="16"/>
                                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Line Style" id="plB-2D-Cap">
                                                     <font key="font" usesAppearanceFont="YES"/>
@@ -323,24 +323,24 @@
                                         </constraints>
                                     </customView>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="xhZ-Ey-nMa">
-                                        <rect key="frame" x="0.0" y="36" width="449" height="32"/>
+                                        <rect key="frame" x="0.0" y="36" width="434" height="32"/>
                                         <subviews>
                                             <button translatesAutoresizingMaskIntoConstraints="NO" id="P7u-1k-sU0">
                                                 <rect key="frame" x="0.0" y="6" width="20" height="20"/>
-                                                <constraints>
-                                                    <constraint firstAttribute="height" constant="20" id="4Pd-RI-PEi"/>
-                                                    <constraint firstAttribute="width" constant="20" id="dSK-Tf-Fzw"/>
-                                                </constraints>
                                                 <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" image="AIchange" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="aPC-te-078">
                                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                     <font key="font" metaFont="system"/>
                                                 </buttonCell>
+                                                <constraints>
+                                                    <constraint firstAttribute="height" constant="20" id="4Pd-RI-PEi"/>
+                                                    <constraint firstAttribute="width" constant="20" id="dSK-Tf-Fzw"/>
+                                                </constraints>
                                                 <connections>
                                                     <action selector="lineStyleButtonAction:" target="-2" id="Y1o-pc-GhN"/>
                                                 </connections>
                                             </button>
                                             <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="O1i-7T-RXp">
-                                                <rect key="frame" x="24" y="8" width="341" height="16"/>
+                                                <rect key="frame" x="24" y="8" width="326" height="16"/>
                                                 <constraints>
                                                     <constraint firstAttribute="height" constant="16" id="74i-6a-oEy"/>
                                                 </constraints>
@@ -357,31 +357,31 @@
                                         </constraints>
                                     </customView>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="Rax-Hz-iCT">
-                                        <rect key="frame" x="0.0" y="0.0" width="449" height="32"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="434" height="32"/>
                                         <subviews>
                                             <button tag="1" translatesAutoresizingMaskIntoConstraints="NO" id="5Ap-Ht-ASC">
                                                 <rect key="frame" x="0.0" y="6" width="20" height="20"/>
-                                                <constraints>
-                                                    <constraint firstAttribute="height" constant="20" id="rBz-4w-kCr"/>
-                                                    <constraint firstAttribute="width" constant="20" id="yTb-3p-2lE"/>
-                                                </constraints>
                                                 <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" image="AIchange" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="XR9-8F-wdf">
                                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                     <font key="font" metaFont="system"/>
                                                 </buttonCell>
+                                                <constraints>
+                                                    <constraint firstAttribute="height" constant="20" id="rBz-4w-kCr"/>
+                                                    <constraint firstAttribute="width" constant="20" id="yTb-3p-2lE"/>
+                                                </constraints>
                                                 <connections>
                                                     <action selector="lineStyleButtonAction:" target="-2" id="W9a-6t-WpC"/>
                                                 </connections>
                                             </button>
                                             <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="yvy-I6-8US">
-                                                <rect key="frame" x="24" y="8" width="341" height="16"/>
+                                                <rect key="frame" x="24" y="8" width="326" height="16"/>
                                                 <constraints>
                                                     <constraint firstAttribute="height" constant="16" id="7Xq-GM-DqZ"/>
                                                 </constraints>
                                                 <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="Gc0-EO-5ne"/>
                                             </imageView>
-                                            <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Zsv-cd-gPh" customClass="KMComboBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                                <rect key="frame" x="377" y="4" width="72" height="23"/>
+                                            <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Zsv-cd-gPh" customClass="KMComboBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                                                <rect key="frame" x="361" y="4" width="73" height="23"/>
                                                 <constraints>
                                                     <constraint firstAttribute="width" constant="69" id="Vjg-K7-yVm"/>
                                                 </constraints>
@@ -431,12 +431,12 @@
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="WCX-mL-xfX">
-                                <rect key="frame" x="16" y="159" width="449" height="64"/>
+                                <rect key="frame" x="16" y="161" width="434" height="64"/>
                                 <subviews>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="Q0n-es-MlW">
-                                        <rect key="frame" x="0.0" y="32" width="449" height="32"/>
+                                        <rect key="frame" x="0.0" y="32" width="434" height="32"/>
                                         <subviews>
-                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="N5b-9k-Q9U">
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="N5b-9k-Q9U">
                                                 <rect key="frame" x="-2" y="8" width="74" height="16"/>
                                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Start &amp; End" id="vNb-39-gWK">
                                                     <font key="font" usesAppearanceFont="YES"/>
@@ -452,10 +452,10 @@
                                         </constraints>
                                     </customView>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="QsI-2P-QDa">
-                                        <rect key="frame" x="0.0" y="0.0" width="449" height="32"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="434" height="32"/>
                                         <subviews>
                                             <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="Wib-02-9dq" customClass="KMPopUpButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                                <rect key="frame" x="0.0" y="0.0" width="225" height="32"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="218" height="32"/>
                                                 <popUpButtonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" inset="2" arrowPosition="noArrow" id="rKK-kz-Z0l" customClass="KMPopUpButtonCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                     <font key="font" metaFont="menu"/>
@@ -463,7 +463,7 @@
                                                 </popUpButtonCell>
                                             </popUpButton>
                                             <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="7Er-ld-5uZ" customClass="KMPopUpButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                                <rect key="frame" x="224" y="0.0" width="225" height="32"/>
+                                                <rect key="frame" x="217" y="0.0" width="217" height="32"/>
                                                 <popUpButtonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" inset="2" arrowPosition="noArrow" id="Fte-Qa-oBp" customClass="KMPopUpButtonCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                     <font key="font" metaFont="menu"/>
@@ -496,10 +496,10 @@
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="mVw-xI-3mn">
-                                <rect key="frame" x="16" y="401" width="449" height="51"/>
+                                <rect key="frame" x="16" y="403" width="434" height="54"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="DSM-Hq-Kyw">
-                                        <rect key="frame" x="-2" y="31" width="453" height="20"/>
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="DSM-Hq-Kyw">
+                                        <rect key="frame" x="-2" y="34" width="438" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="20" id="bkw-lV-fQT"/>
                                         </constraints>
@@ -510,7 +510,7 @@
                                         </textFieldCell>
                                     </textField>
                                     <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="c2Y-hb-2CY" customClass="KMComboBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                        <rect key="frame" x="377" y="0.0" width="72" height="23"/>
+                                        <rect key="frame" x="361" y="2" width="73" height="23"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="69" id="ZdS-vc-3EC"/>
                                         </constraints>
@@ -530,7 +530,7 @@
                                         </connections>
                                     </comboBox>
                                     <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ybI-lG-duP">
-                                        <rect key="frame" x="-2" y="-3" width="371" height="28"/>
+                                        <rect key="frame" x="-2" y="-2" width="356" height="28"/>
                                         <sliderCell key="cell" alignment="left" maxValue="1" tickMarkPosition="above" sliderType="linear" id="w59-cx-DIN"/>
                                         <connections>
                                             <action selector="opacitySliderAction:" target="-2" id="TFl-qU-6dK"/>
@@ -550,9 +550,9 @@
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="Ylg-k5-0Xf">
-                                <rect key="frame" x="16" y="462" width="449" height="72"/>
+                                <rect key="frame" x="16" y="467" width="434" height="72"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zk5-HT-4yl">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zk5-HT-4yl">
                                         <rect key="frame" x="-2" y="42" width="62" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="20" id="o4k-p8-u2b"/>
@@ -564,7 +564,7 @@
                                         </textFieldCell>
                                     </textField>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="cVx-1f-Zop" customClass="KMColorPickerView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                        <rect key="frame" x="0.0" y="0.0" width="449" height="32"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="434" height="32"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="32" id="Tx6-Nq-7mM"/>
                                         </constraints>
@@ -583,9 +583,9 @@
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="29n-Jr-QG2">
-                                <rect key="frame" x="16" y="544" width="449" height="102"/>
+                                <rect key="frame" x="16" y="549" width="434" height="102"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JsL-wX-Njt">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JsL-wX-Njt">
                                         <rect key="frame" x="-2" y="72" width="42" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="20" id="z6d-A9-0bg"/>
@@ -597,13 +597,13 @@
                                         </textFieldCell>
                                     </textField>
                                     <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="gqn-lo-y0r">
-                                        <rect key="frame" x="0.0" y="0.0" width="449" height="32"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="434" height="32"/>
                                         <view key="contentView" id="vDH-fx-TXA">
-                                            <rect key="frame" x="0.0" y="0.0" width="449" height="32"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="434" height="32"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             <subviews>
                                                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="jU9-Gn-EkZ" customClass="KMColorPickerView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                                    <rect key="frame" x="0.0" y="0.0" width="449" height="32"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="434" height="32"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="32" id="nUi-a5-yYb"/>
                                                     </constraints>
@@ -622,7 +622,7 @@
                                             </constraints>
                                         </view>
                                     </box>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="n33-LV-rlJ">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="n33-LV-rlJ">
                                         <rect key="frame" x="-2" y="42" width="52" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="20" id="3sz-hc-KDq"/>
@@ -646,10 +646,10 @@
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="0Qb-jg-5Ce">
-                                <rect key="frame" x="16" y="20" width="449" height="129"/>
+                                <rect key="frame" x="16" y="20" width="434" height="131"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="04S-yS-pWn">
-                                        <rect key="frame" x="-2" y="99" width="35" height="20"/>
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="04S-yS-pWn">
+                                        <rect key="frame" x="-2" y="101" width="35" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="20" id="c2U-EW-hwg"/>
                                         </constraints>
@@ -660,24 +660,21 @@
                                         </textFieldCell>
                                     </textField>
                                     <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="82h-wT-aSq">
-                                        <rect key="frame" x="433" y="101" width="16" height="16"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="16" id="KAE-r0-pPR"/>
-                                            <constraint firstAttribute="width" constant="16" id="fnd-vZ-GRz"/>
-                                        </constraints>
+                                        <rect key="frame" x="418" y="103" width="16" height="16"/>
                                         <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="KMImageNameUXIconBtnFontsetNor" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="Iae-nh-IMf">
                                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                             <font key="font" metaFont="system"/>
                                         </buttonCell>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="16" id="KAE-r0-pPR"/>
+                                            <constraint firstAttribute="width" constant="16" id="fnd-vZ-GRz"/>
+                                        </constraints>
                                         <connections>
                                             <action selector="fontButtonAction:" target="-2" id="pke-Eb-3xP"/>
                                         </connections>
                                     </button>
                                     <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="VRm-2Z-yAc" customClass="KMPopUpButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                        <rect key="frame" x="0.0" y="1" width="346" height="24"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="24" id="QdD-zJ-eI1"/>
-                                        </constraints>
+                                        <rect key="frame" x="0.0" y="3" width="331" height="24"/>
                                         <popUpButtonCell key="cell" type="square" title="UltraLight" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" state="on" inset="2" arrowPosition="noArrow" selectedItem="Xj8-wD-Eo7" id="0e6-ZT-mEd">
                                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -695,26 +692,29 @@
                                                 </items>
                                             </menu>
                                         </popUpButtonCell>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="24" id="QdD-zJ-eI1"/>
+                                        </constraints>
                                         <connections>
                                             <action selector="fontStylePopUpButtonAction:" target="-2" id="FbC-KN-6Ch"/>
                                         </connections>
                                     </popUpButton>
                                     <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="FBi-S9-RTC" customClass="KMPopUpButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                        <rect key="frame" x="0.0" y="33" width="449" height="24"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="24" id="svD-NU-tnJ"/>
-                                        </constraints>
+                                        <rect key="frame" x="0.0" y="35" width="434" height="24"/>
                                         <popUpButtonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="left" lineBreakMode="truncatingTail" inset="2" arrowPosition="noArrow" id="Sh9-6x-k3S" customClass="KMPopUpButtonCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                             <font key="font" usesAppearanceFont="YES"/>
                                             <menu key="menu" id="52H-Tg-hJy"/>
                                         </popUpButtonCell>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="24" id="svD-NU-tnJ"/>
+                                        </constraints>
                                         <connections>
                                             <action selector="fontPopUpButtonAction:" target="-2" id="D3z-rp-QdK"/>
                                         </connections>
                                     </popUpButton>
-                                    <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7m0-hp-PRc" customClass="KMComboBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                        <rect key="frame" x="354" y="1" width="95" height="23"/>
+                                    <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7m0-hp-PRc" customClass="KMComboBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                                        <rect key="frame" x="338" y="3" width="96" height="23"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="92" id="QPh-ca-xew"/>
                                         </constraints>
@@ -751,7 +751,7 @@
                                         </connections>
                                     </comboBox>
                                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="An2-NL-h4C" customClass="KMColorPickerView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                        <rect key="frame" x="0.0" y="67" width="449" height="32"/>
+                                        <rect key="frame" x="0.0" y="69" width="434" height="32"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="32" id="Qfn-a0-H2v"/>
                                         </constraints>
@@ -826,8 +826,8 @@
                 <rect key="frame" x="-100" y="-100" width="303" height="15"/>
                 <autoresizingMask key="autoresizingMask"/>
             </scroller>
-            <scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="GYX-OK-zPd">
-                <rect key="frame" x="465" y="0.0" width="16" height="661"/>
+            <scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.94047619047619047" horizontal="NO" id="GYX-OK-zPd">
+                <rect key="frame" x="466" y="0.0" width="15" height="661"/>
                 <autoresizingMask key="autoresizingMask"/>
             </scroller>
             <point key="canvasLocation" x="-160.5" y="1075.5"/>

+ 11 - 11
PDF Office/PDF Master/Class/PDFTools/Merge/OCPart/KMPDFEditAppendWindow.m

@@ -1687,7 +1687,7 @@ static KMPDFEditAppendWindow *windowController = nil;
                 continue;
             }
             
-            KMPDFViewController *mainViewController = document.pdfViewController;
+            KMMainViewController *mainViewController = document.mainViewController;
             if ([self.PDFDocument.documentURL.path isEqualToString:document.fileURL.path]) {
                 continue;
             }
@@ -1696,16 +1696,16 @@ static KMPDFEditAppendWindow *windowController = nil;
                 continue;
             }
             
-//            CPDFDocument *pdfDocument = mainViewController.listView.document;
-//            if (pdfDocument.isLocked || (!pdfDocument.allowsCopying || !pdfDocument.allowsPrinting)) {
-//                [_lockFilePathArr addObject:pdfDocument.documentURL.path];
-//            } else {
-//                KMFileAttribute *file = [[KMFileAttribute alloc] init];
-//                file.filePath = document.fileURL.path;
-//                file.pdfDocument = mainViewController.document;
-//
-//                [_files addObject:file];
-//            }
+            CPDFDocument *pdfDocument = mainViewController.listView.document;
+            if (pdfDocument.isLocked || (!pdfDocument.allowsCopying || !pdfDocument.allowsPrinting)) {
+                [_lockFilePathArr addObject:pdfDocument.documentURL.path];
+            } else {
+                KMFileAttribute *file = [[KMFileAttribute alloc] init];
+                file.filePath = document.fileURL.path;
+                file.pdfDocument = mainViewController.document;
+
+                [_files addObject:file];
+            }
         }
     }
     

+ 2 - 2
PDF Office/PDF Master/Class/PDFTools/PageEdit/View/KMPageEditThumbnailItem.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>

+ 2 - 4
PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/KMPrintChooseView.swift

@@ -56,7 +56,6 @@ class KMPrintChooseView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         
         //打印机名称
         self.printerButton.data = NSPrinter.printerNames
@@ -163,9 +162,8 @@ class KMPrintChooseView: BaseXibView {
     }
     
     //刷新界面UI 和 数据
-    func reloadData() {
-//        super.reloadData()
-        
+    func reloadData() { 
+
         self.printerButton.stringValue = self.outputData.printer.name
         self.pageSetButton.title = self.outputData.paper.info.type.rawValue
         self.textFieldStepperView.stringValue = self.outputData.printer.copies.description

+ 2 - 3
PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/View/KMPrintChoosePageSizeView.swift

@@ -45,7 +45,6 @@ class KMPrintChoosePageSizeView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         
         self.sizeView.dataDidChange = { [weak self] view, data in
             self?.outputData.size = data
@@ -95,8 +94,8 @@ class KMPrintChoosePageSizeView: BaseXibView {
     }
     
     //刷新界面UI 和 数据
-    func reloadData() {
-//        super.reloadData()
+
+    func reloadData() { 
          
         //选中按钮状态
         let buttonArray = [self.sizeButton, self.posterButton, self.pamphletButton, self.multipageButton]

+ 1 - 3
PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/View/View/DealPaper/KMPrintChoosePageSizeMultipageView.swift

@@ -35,7 +35,6 @@ class KMPrintChoosePageSizeMultipageView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         
         self.pageOfPaperButton.removeAllItems()
         self.pageOfPaperButton.addItems(withTitles: KMPrintPageOperation.PageOfPaper.PageType.allValues())
@@ -53,9 +52,8 @@ class KMPrintChoosePageSizeMultipageView: BaseXibView {
     }
     
     //刷新界面UI 和 数据
+
     func reloadData() {
-//        super.reloadData()
-        
 //        self.pageOfPaperButton.selectItem(withTitle: self.outputData.pageOfPaper.type.rawValue)
 //        self.pageOfPaperXTextField.isEnabled = (self.outputData.pageOfPaper.type == .custom) ? true : false
 //        self.pageOfPaperXTextField.stringValue = self.outputData.pageOfPaper.point.x.description

+ 0 - 2
PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/View/View/DealPaper/KMPrintChoosePageSizePosterView.swift

@@ -48,7 +48,6 @@ class KMPrintChoosePageSizePosterView: BaseXibView {
     }
 
     func setup() {
-//        super.setup()
         
         self.breakUpPageButton.removeAllItems()
         self.breakUpPageButton.addItems(withTitles: KMPrintPageOperation.PageOfPaper.PageType.allValues())
@@ -85,7 +84,6 @@ class KMPrintChoosePageSizePosterView: BaseXibView {
     
     //刷新界面UI 和 数据
     func reloadData() {
-//        super.reloadData()
         
         self.tileButton.state = (self.outputData.type == .tile) ? .on : .off
         self.tileView.isHidden = (self.outputData.type == .tile) ? false: true

+ 0 - 2
PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/View/View/DealPaper/View/KMPrintDuplexPrintingSetView.swift

@@ -30,7 +30,6 @@ class KMPrintDuplexPrintingSetView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         self.duplexPrintingButton.title = NSLocalizedString("Duplex printing", comment: "")
         self.duplexPrintingButton.imageName = "btn_checkbox_unsel_on"
         self.duplexPrintingButton.selectImageName = "btn_checkbox_sel_on"
@@ -66,7 +65,6 @@ class KMPrintDuplexPrintingSetView: BaseXibView {
     
     //刷新界面UI 和 数据
     func reloadData() {
-//        super.reloadData()
         if self.data.options.contains(.printOnBothSides) {
             self.duplexPrintingButton.state = .on
             self.shortEdgeButton.isEnabled = true

+ 0 - 2
PDF Office/PDF Master/Class/PDFTools/Print/View/ChooseView/View/View/PaperSet/View/KMPrintPaperSetView.swift

@@ -48,7 +48,6 @@ class KMPrintPaperSetView: BaseXibView {
     }
 
     func setup() {
-//        super.setup()
         
         self.sizeButton.removeAllItems()
         self.sizeButton.addItems(withTitles: KMPrintPaperInfo.KMPaperType.allValues())
@@ -62,7 +61,6 @@ class KMPrintPaperSetView: BaseXibView {
     
     //刷新界面UI 和 数据
     func reloadData() {
-//        super.reloadData()
         
         self.sizeButton.selectItem(withTitle: self.data.type.rawValue)
         self.topTextFieldStepper.stringValue = self.data.inset.top.description

+ 0 - 2
PDF Office/PDF Master/Class/PDFTools/Print/View/Preview/KMPrintPreviewView.swift

@@ -104,7 +104,6 @@ class KMPrintPreviewView: BaseXibView {
     }
     
     func setup() {
-//        super.setup()
         
 //        self.previewContentView.wantsLayer = true
 //        self.previewContentView.layer?.backgroundColor = NSColor.km_init(hex: "#F7F8FA").cgColor
@@ -142,7 +141,6 @@ class KMPrintPreviewView: BaseXibView {
     
     //刷新PDFPreview
     func reloadData() {
-//        super.reloadData()
 
         //UI 显示
         if self.pdfDocument != nil {

+ 4 - 4
PDF Office/PDF Master/Class/PDFTools/Snapshot/Window/SnapshotWindow.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
         <deployment version="101300" identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
-        <plugIn identifier="com.apple.pdfkit.ibplugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <plugIn identifier="com.apple.pdfkit.ibplugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -19,7 +19,7 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="270" y="479" width="1024" height="219"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
             <value key="minSize" type="size" width="213" height="107"/>
             <view key="contentView" id="6">
                 <rect key="frame" x="0.0" y="0.0" width="1024" height="219"/>

+ 2 - 4
PDF Office/PDF Master/Class/PDFTools/Tools/KMImageTitleButton/KMImageTitleButton.swift

@@ -73,12 +73,10 @@ typealias KMImageTitleButtonAction = (_ view: KMImageTitleButton, _ button: NSBu
     }
     
     func setup() {
-//        super.setup()
-//        self.titleLabel.font = NSFont(name: "SFProText-Regular", size: 14)
+       
     }
     
-    func reloadData() {
-//        super.reloadData()
+    func reloadData() { 
         
         self.titleLabel.stringValue = NSLocalizedString(self.title, comment: "")
         

+ 0 - 2
PDF Office/PDF Master/Class/PDFTools/Tools/KMTextFieldStepperView/KMTextFieldStepperView.swift

@@ -81,7 +81,6 @@ class KMTextFieldStepperView: BaseXibView, NSTextFieldDelegate {
     }
     
     func setup() {
-//        super.setup()
         
         self.presenter.initPresenter(delegate: self, model: self.model)
         
@@ -98,7 +97,6 @@ class KMTextFieldStepperView: BaseXibView, NSTextFieldDelegate {
     
     //刷新界面UI 和 数据
     func reloadData() {
-//        super.reloadData()
         
         self.inputTextField.stringValue = self.model.stringValue
     }

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Form/KMFormListMenuPopWindowController.xib

@@ -31,7 +31,7 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="196" y="240" width="500" height="290"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
             <view key="contentView" wantsLayer="YES" id="se5-gp-TjO">
                 <rect key="frame" x="0.0" y="0.0" width="500" height="288"/>
                 <autoresizingMask key="autoresizingMask"/>

+ 29 - 29
PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/KMPresentationTopViewController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -27,14 +27,14 @@
             <subviews>
                 <button translatesAutoresizingMaskIntoConstraints="NO" id="xY2-DM-OMi">
                     <rect key="frame" x="12" y="9" width="40" height="24"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="40" id="TgB-0K-ORY"/>
-                        <constraint firstAttribute="height" constant="24" id="Z6D-2a-1e0"/>
-                    </constraints>
                     <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="KMPresentationImageNameExit" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="FqK-vA-X7Y">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
                     </buttonCell>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="40" id="TgB-0K-ORY"/>
+                        <constraint firstAttribute="height" constant="24" id="Z6D-2a-1e0"/>
+                    </constraints>
                     <connections>
                         <action selector="buttonItemClicked_Exit:" target="-2" id="R22-RA-GkE"/>
                     </connections>
@@ -47,14 +47,14 @@
                         <subviews>
                             <button translatesAutoresizingMaskIntoConstraints="NO" id="LN3-fE-ZXk">
                                 <rect key="frame" x="0.0" y="-4" width="40" height="40"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="40" id="bE3-uA-bhc"/>
-                                    <constraint firstAttribute="height" constant="40" id="ibH-Xu-ehr"/>
-                                </constraints>
                                 <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="KMPresentationImageNameUndo" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="ESZ-vM-7YS">
                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                     <font key="font" metaFont="system"/>
                                 </buttonCell>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="40" id="bE3-uA-bhc"/>
+                                    <constraint firstAttribute="height" constant="40" id="ibH-Xu-ehr"/>
+                                </constraints>
                                 <connections>
                                     <action selector="buttonItemClicked_Undo:" target="-2" id="beT-Lq-qYg"/>
                                 </connections>
@@ -74,28 +74,28 @@
                             </customView>
                             <button translatesAutoresizingMaskIntoConstraints="NO" id="3qv-mc-BdY">
                                 <rect key="frame" x="287" y="6" width="20" height="20"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="20" id="u8d-2p-TVT"/>
-                                    <constraint firstAttribute="height" constant="20" id="uc8-ci-Z0S"/>
-                                </constraints>
                                 <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="KMPresentationImageNameDelete" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="XnW-uy-Bbj">
                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                     <font key="font" metaFont="system"/>
                                 </buttonCell>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="20" id="u8d-2p-TVT"/>
+                                    <constraint firstAttribute="height" constant="20" id="uc8-ci-Z0S"/>
+                                </constraints>
                                 <connections>
                                     <action selector="buttonItemClicked_Delete:" target="-2" id="CSW-DP-SOg"/>
                                 </connections>
                             </button>
                             <button translatesAutoresizingMaskIntoConstraints="NO" id="uik-cR-1me">
                                 <rect key="frame" x="317" y="6" width="20" height="20"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="20" id="3co-RJ-gnz"/>
-                                    <constraint firstAttribute="height" constant="20" id="wxB-bB-9NJ"/>
-                                </constraints>
                                 <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="KMPresentationImageNameTypeSeletion" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="JHz-Q8-Z3G">
                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                     <font key="font" metaFont="system"/>
                                 </buttonCell>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="20" id="3co-RJ-gnz"/>
+                                    <constraint firstAttribute="height" constant="20" id="wxB-bB-9NJ"/>
+                                </constraints>
                                 <connections>
                                     <action selector="buttonItemClicked_Type:" target="-2" id="yXU-lZ-eDp"/>
                                 </connections>
@@ -121,28 +121,28 @@
                 </box>
                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hHt-4X-C0b">
                     <rect key="frame" x="593" y="9" width="20" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="20" id="47D-JB-MvJ"/>
-                        <constraint firstAttribute="width" constant="20" id="uDI-nc-Wnx"/>
-                    </constraints>
                     <buttonCell key="cell" type="bevel" bezelStyle="circular" image="NSGoLeftTemplate" imagePosition="overlaps" alignment="center" imageScaling="proportionallyDown" inset="2" id="8yU-nc-Xff">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
                     </buttonCell>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="20" id="47D-JB-MvJ"/>
+                        <constraint firstAttribute="width" constant="20" id="uDI-nc-Wnx"/>
+                    </constraints>
                     <connections>
                         <action selector="buttonItemClicked_ForwardPage:" target="-2" id="jAJ-7Z-Idx"/>
                     </connections>
                 </button>
                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2vg-aX-HHv">
                     <rect key="frame" x="713" y="9" width="20" height="25"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="20" id="bIi-KW-B9j"/>
-                        <constraint firstAttribute="height" constant="20" id="mBV-qF-zbf"/>
-                    </constraints>
                     <buttonCell key="cell" type="bevel" bezelStyle="circular" image="NSGoRightTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="cgb-NS-Bt7">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
                     </buttonCell>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="20" id="bIi-KW-B9j"/>
+                        <constraint firstAttribute="height" constant="20" id="mBV-qF-zbf"/>
+                    </constraints>
                     <connections>
                         <action selector="buttonItemClicked_BackPage:" target="-2" id="maf-f0-RYx"/>
                     </connections>
@@ -150,7 +150,7 @@
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="Szf-SI-07l">
                     <rect key="frame" x="643" y="10" width="40" height="22"/>
                     <subviews>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RfC-Iw-PQv">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RfC-Iw-PQv">
                             <rect key="frame" x="-2" y="3" width="44" height="16"/>
                             <constraints>
                                 <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="40" id="1s7-I6-Ujw"/>
@@ -193,7 +193,7 @@
         <image name="KMPresentationImageNameExit" width="24" height="24"/>
         <image name="KMPresentationImageNameTypeSeletion" width="20" height="20"/>
         <image name="KMPresentationImageNameUndo" width="40" height="40"/>
-        <image name="NSGoLeftTemplate" width="10" height="14"/>
-        <image name="NSGoRightTemplate" width="10" height="14"/>
+        <image name="NSGoLeftTemplate" width="12" height="17"/>
+        <image name="NSGoRightTemplate" width="12" height="17"/>
     </resources>
 </document>

+ 2 - 13
PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/MainWindowController.xib

@@ -8,22 +8,11 @@
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="MainWindowController" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
-                <outlet property="PDFContendView" destination="Jh3-gZ-0xB" id="3wr-A9-S9T"/>
-                <outlet property="childToolbarController" destination="LGo-eS-kH9" id="1OE-wT-t4D"/>
-                <outlet property="toplayoutConstraint" destination="2qe-2G-Qjm" id="21Y-Qj-ZxA"/>
                 <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
             </connections>
         </customObject>
-        <viewController id="nx9-fp-KNE" customClass="KMMainToolbarController" customModule="PDF_Reader_Pro" customModuleProvider="target">
-            <connections>
-                <outlet property="mainWindowController" destination="-2" id="tJb-kJ-4Rn"/>
-            </connections>
-        </viewController>
-        <viewController id="LGo-eS-kH9" customClass="KMToolbarViewController" customModule="PDF_Reader_Pro" customModuleProvider="target">
-            <connections>
-                <outlet property="mainWindowController" destination="-2" id="s4s-qR-3td"/>
-            </connections>
-        </viewController>
+        <viewController id="nx9-fp-KNE" customClass="KMMainToolbarController" customModule="PDF_Reader_Pro" customModuleProvider="target"/>
+        <viewController id="LGo-eS-kH9" customClass="KMToolbarViewController" customModule="PDF_Reader_Pro" customModuleProvider="target"/>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="F0z-JX-Cv5">

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/SKPresentationOptionsSheetController.swift

@@ -552,7 +552,7 @@ class SKPresentationOptionsSheetController: KMBaseWindowController {
             if mainDoc.isEqual(to: document) {
                 continue
             }
-            if let pdfDoc = mainDoc.pdfViewController?.document {
+            if let pdfDoc = mainDoc.mainViewController?.document {
                 if pdfDoc.pageCount == pageCount {
                     documents.add(doc)
                 }

PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsBottomMid.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsBottomMid.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsBottomMid.imageset/South.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsBottomMid.imageset/South.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDate.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDate.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDate.imageset/ic_cursors_date-1.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDate.imageset/ic_cursors_date-1.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDragMove.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDragMove.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDragMove.imageset/Move.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsDragMove.imageset/Move.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFork.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFork.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFork.imageset/ic_cursors_fork-1.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFork.imageset/ic_cursors_fork-1.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFormLine.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFormLine.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFormLine.imageset/ic_cursors_line-1.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFormLine.imageset/ic_cursors_line-1.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFreehand.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFreehand.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFreehand.imageset/light_ic_cursors_freehand-1.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFreehand.imageset/light_ic_cursors_freehand-1.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFreehand.imageset/light_ic_cursors_freehand.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsFreehand.imageset/light_ic_cursors_freehand.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsHighlight.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsHighlight.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsHighlight.imageset/light_ic_cursors_highlight-1.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsHighlight.imageset/light_ic_cursors_highlight-1.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsHighlight.imageset/light_ic_cursors_highlight.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsHighlight.imageset/light_ic_cursors_highlight.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMax.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMax.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMax.imageset/North West.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMax.imageset/North West.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMid.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMid.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMid.imageset/West.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMid.imageset/West.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMin.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMin.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMin.imageset/South West.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLeftMin.imageset/South West.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLine.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLine.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLine.imageset/light_ic_cursors_line (1).pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLine.imageset/light_ic_cursors_line (1).pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLine.imageset/light_ic_cursors_line.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLine.imageset/light_ic_cursors_line.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLink.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLink.imageset/Contents.json



PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLink.imageset/light_ic_cursors_link.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLink.imageset/light_ic_cursors_link.pdf


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLinkDestination.imageset/Contents.json → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLinkDestination.imageset/Contents.json


PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLinkDestination.imageset/Screenshot select.pdf → PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsLinkDestination.imageset/Screenshot select.pdf


+ 0 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/NSImage/CPDFListView.xcassets/NSCursors/CPDFListViewImageNameCursorsNote.imageset/Contents.json


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor