Browse Source

【UI替换】主页 - 管理快捷工具

lizhe 1 year ago
parent
commit
1e5ac7ad1d
16 changed files with 1497 additions and 312 deletions
  1. 90 3
      PDF Office/PDF Master.xcodeproj/project.pbxproj
  2. 293 183
      PDF Office/PDF Master.xcodeproj/xcuserdata/lizhe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 81 78
      PDF Office/PDF Master/Class/Home/View/HomeContentView/History/Cell/KMHomeHistoryCollectionItem.swift
  4. 15 16
      PDF Office/PDF Master/Class/Home/View/HomeContentView/History/Cell/KMHomeHistoryCollectionItem.xib
  5. 2 2
      PDF Office/PDF Master/Class/Home/View/HomeContentView/History/KMHomeHistoryListView.swift
  6. 12 0
      PDF Office/PDF Master/Class/Home/View/HomeContentView/History/Model/KMHomeHistoryListViewModel.swift
  7. 8 1
      PDF Office/PDF Master/Class/Home/View/HomeContentView/KMHomeContentView.swift
  8. 1 1
      PDF Office/PDF Master/Class/Home/View/HomeContentView/QucikTools/KMQucikToolsView.swift
  9. 80 24
      PDF Office/PDF Master/Class/Home/View/HomeContentView/QucikTools/Model/KMQucikToolsModel.swift
  10. 38 0
      PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/KMHomeQuickToolsWindowController.swift
  11. 43 0
      PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/KMHomeQuickToolsWindowController.xib
  12. 411 0
      PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/View/KMHomeQuickToolsCollectionView.swift
  13. 301 0
      PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/View/KMHomeQuickToolsCollectionView.xib
  14. 49 0
      PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/View/KMHomeQuickToolsWindowCollectionViewItem.swift
  15. 72 0
      PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/View/KMHomeQuickToolsWindowCollectionViewItem.xib
  16. 1 4
      PDF Office/PDF Master/Class/KMAdvertisement/View/View/KMAdvertisementShowView.xib

+ 90 - 3
PDF Office/PDF Master.xcodeproj/project.pbxproj

@@ -1209,6 +1209,27 @@
 		AD85D19E2AEF927D000F4D28 /* KMQucikToolsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D19D2AEF927D000F4D28 /* KMQucikToolsModel.swift */; };
 		AD85D19F2AEF927D000F4D28 /* KMQucikToolsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D19D2AEF927D000F4D28 /* KMQucikToolsModel.swift */; };
 		AD85D1A02AEF927D000F4D28 /* KMQucikToolsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D19D2AEF927D000F4D28 /* KMQucikToolsModel.swift */; };
+		AD85D1A42AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1A22AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift */; };
+		AD85D1A52AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1A22AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift */; };
+		AD85D1A62AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1A22AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift */; };
+		AD85D1A72AF09864000F4D28 /* KMHomeQuickToolsWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD85D1A32AF09864000F4D28 /* KMHomeQuickToolsWindowController.xib */; };
+		AD85D1A82AF09864000F4D28 /* KMHomeQuickToolsWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD85D1A32AF09864000F4D28 /* KMHomeQuickToolsWindowController.xib */; };
+		AD85D1A92AF09864000F4D28 /* KMHomeQuickToolsWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD85D1A32AF09864000F4D28 /* KMHomeQuickToolsWindowController.xib */; };
+		AD85D1AD2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1AB2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift */; };
+		AD85D1AE2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1AB2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift */; };
+		AD85D1AF2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1AB2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift */; };
+		AD85D1B02AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD85D1AC2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib */; };
+		AD85D1B12AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD85D1AC2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib */; };
+		AD85D1B22AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD85D1AC2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib */; };
+		AD85D1B52AF0CCFC000F4D28 /* KMHomeHistoryListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1B42AF0CCFC000F4D28 /* KMHomeHistoryListViewModel.swift */; };
+		AD85D1B62AF0CCFC000F4D28 /* KMHomeHistoryListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1B42AF0CCFC000F4D28 /* KMHomeHistoryListViewModel.swift */; };
+		AD85D1B72AF0CCFC000F4D28 /* KMHomeHistoryListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1B42AF0CCFC000F4D28 /* KMHomeHistoryListViewModel.swift */; };
+		AD85D1B92AF0D2CA000F4D28 /* KMHomeQuickToolsCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1B82AF0D2CA000F4D28 /* KMHomeQuickToolsCollectionView.swift */; };
+		AD85D1BA2AF0D2CA000F4D28 /* KMHomeQuickToolsCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1B82AF0D2CA000F4D28 /* KMHomeQuickToolsCollectionView.swift */; };
+		AD85D1BB2AF0D2CA000F4D28 /* KMHomeQuickToolsCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD85D1B82AF0D2CA000F4D28 /* KMHomeQuickToolsCollectionView.swift */; };
+		AD85D1BD2AF0D2DD000F4D28 /* KMHomeQuickToolsCollectionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD85D1BC2AF0D2DD000F4D28 /* KMHomeQuickToolsCollectionView.xib */; };
+		AD85D1BE2AF0D2DD000F4D28 /* KMHomeQuickToolsCollectionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD85D1BC2AF0D2DD000F4D28 /* KMHomeQuickToolsCollectionView.xib */; };
+		AD85D1BF2AF0D2DD000F4D28 /* KMHomeQuickToolsCollectionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD85D1BC2AF0D2DD000F4D28 /* KMHomeQuickToolsCollectionView.xib */; };
 		AD867F8629D94F5100F00440 /* KMBOTAOutlineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD867F8529D94F5100F00440 /* KMBOTAOutlineView.swift */; };
 		AD867F8729D94F5100F00440 /* KMBOTAOutlineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD867F8529D94F5100F00440 /* KMBOTAOutlineView.swift */; };
 		AD867F8829D94F5100F00440 /* KMBOTAOutlineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD867F8529D94F5100F00440 /* KMBOTAOutlineView.swift */; };
@@ -3843,6 +3864,13 @@
 		AD85D1812AEF46C2000F4D28 /* KMHomeNOFileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMHomeNOFileView.swift; sourceTree = "<group>"; };
 		AD85D1862AEF46DF000F4D28 /* KMHomeNOFileView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMHomeNOFileView.xib; sourceTree = "<group>"; };
 		AD85D19D2AEF927D000F4D28 /* KMQucikToolsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMQucikToolsModel.swift; sourceTree = "<group>"; };
+		AD85D1A22AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMHomeQuickToolsWindowController.swift; sourceTree = "<group>"; };
+		AD85D1A32AF09864000F4D28 /* KMHomeQuickToolsWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMHomeQuickToolsWindowController.xib; sourceTree = "<group>"; };
+		AD85D1AB2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMHomeQuickToolsWindowCollectionViewItem.swift; sourceTree = "<group>"; };
+		AD85D1AC2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMHomeQuickToolsWindowCollectionViewItem.xib; sourceTree = "<group>"; };
+		AD85D1B42AF0CCFC000F4D28 /* KMHomeHistoryListViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMHomeHistoryListViewModel.swift; sourceTree = "<group>"; };
+		AD85D1B82AF0D2CA000F4D28 /* KMHomeQuickToolsCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMHomeQuickToolsCollectionView.swift; sourceTree = "<group>"; };
+		AD85D1BC2AF0D2DD000F4D28 /* KMHomeQuickToolsCollectionView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMHomeQuickToolsCollectionView.xib; sourceTree = "<group>"; };
 		AD867F8529D94F5100F00440 /* KMBOTAOutlineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBOTAOutlineView.swift; sourceTree = "<group>"; };
 		AD867F8A29D950B400F00440 /* KMBOTAOutlineView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMBOTAOutlineView.xib; sourceTree = "<group>"; };
 		AD867F8F29D9554F00F00440 /* KMBOTAOutlineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBOTAOutlineItem.swift; sourceTree = "<group>"; };
@@ -5591,6 +5619,7 @@
 		9F78EFD428F81F1A001E66F4 /* WindowController */ = {
 			isa = PBXGroup;
 			children = (
+				AD85D1A12AF09837000F4D28 /* HomeQuickToolsWindowController */,
 				ADAFD9FB2AE8AE9800F084BC /* KMURLToPDFWindowController */,
 				899700DD28F3A9F2009AF911 /* KMHomeWindowController.swift */,
 				899700DE28F3A9F2009AF911 /* KMHomeWindowController.xib */,
@@ -5960,6 +5989,42 @@
 			path = Model;
 			sourceTree = "<group>";
 		};
+		AD85D1A12AF09837000F4D28 /* HomeQuickToolsWindowController */ = {
+			isa = PBXGroup;
+			children = (
+				AD85D1AA2AF09C61000F4D28 /* View */,
+				AD85D1A22AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift */,
+				AD85D1A32AF09864000F4D28 /* KMHomeQuickToolsWindowController.xib */,
+			);
+			path = HomeQuickToolsWindowController;
+			sourceTree = "<group>";
+		};
+		AD85D1AA2AF09C61000F4D28 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				AD85D1AB2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift */,
+				AD85D1AC2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib */,
+				AD85D1B82AF0D2CA000F4D28 /* KMHomeQuickToolsCollectionView.swift */,
+				AD85D1BC2AF0D2DD000F4D28 /* KMHomeQuickToolsCollectionView.xib */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		AD85D1B32AF0CCDE000F4D28 /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				AD85D1B42AF0CCFC000F4D28 /* KMHomeHistoryListViewModel.swift */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		AD85D1C02AF0F2D3000F4D28 /* Manager */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = Manager;
+			sourceTree = "<group>";
+		};
 		AD867F8929D94F5500F00440 /* View */ = {
 			isa = PBXGroup;
 			children = (
@@ -6249,10 +6314,10 @@
 			isa = PBXGroup;
 			children = (
 				AD85D1852AEF46C9000F4D28 /* NoFileView */,
-				ADAFDA552AEB451600F084BC /* KMHomeContentView.swift */,
-				ADAFDA5D2AEB455500F084BC /* KMHomeContentView.xib */,
 				ADAFDA622AEB466800F084BC /* QucikTools */,
 				ADAFDA612AEB465F00F084BC /* History */,
+				ADAFDA552AEB451600F084BC /* KMHomeContentView.swift */,
+				ADAFDA5D2AEB455500F084BC /* KMHomeContentView.xib */,
 			);
 			path = HomeContentView;
 			sourceTree = "<group>";
@@ -6260,6 +6325,7 @@
 		ADAFDA612AEB465F00F084BC /* History */ = {
 			isa = PBXGroup;
 			children = (
+				AD85D1B32AF0CCDE000F4D28 /* Model */,
 				ADAFDA732AEB5F9B00F084BC /* Cell */,
 				ADAFDA672AEB46F500F084BC /* KMHomeHistoryListView.swift */,
 				ADAFDA6F2AEB470E00F084BC /* KMHomeHistoryListView.xib */,
@@ -6270,6 +6336,7 @@
 		ADAFDA622AEB466800F084BC /* QucikTools */ = {
 			isa = PBXGroup;
 			children = (
+				AD85D1C02AF0F2D3000F4D28 /* Manager */,
 				AD85D19C2AEF925D000F4D28 /* Model */,
 				ADAFDA882AEB804F00F084BC /* View */,
 				ADAFDA632AEB46D600F084BC /* KMQucikToolsView.swift */,
@@ -8922,6 +8989,7 @@
 				AD8810A329A8459000178CA1 /* KMComparativeTableViewController.xib in Resources */,
 				AD867F9829D955D200F00440 /* KMBOTAOutlineCellView.xib in Resources */,
 				9F1F82BF292E01860092C4B4 /* KMCloudEmptyCollectionViewItem.xib in Resources */,
+				AD85D1A72AF09864000F4D28 /* KMHomeQuickToolsWindowController.xib in Resources */,
 				9F0CB48A29683DC400007028 /* KMPropertiesPanelPresetColorSubVC.xib in Resources */,
 				9F8DDF302924B855006CDC73 /* KMPDFToolsViewController.xib in Resources */,
 				AD867F8B29D950B400F00440 /* KMBOTAOutlineView.xib in Resources */,
@@ -8949,6 +9017,7 @@
 				BB7F7BFA29AA469F00A3E4E7 /* KMSigntureViewItem.xib in Resources */,
 				ADAFDA0D2AE8DD6600F084BC /* KMAdvertisementCollectionViewItem.xib in Resources */,
 				9F1F82E62934D5240092C4B4 /* KMHomeExtractActionViewController.xib in Resources */,
+				AD85D1BD2AF0D2DD000F4D28 /* KMHomeQuickToolsCollectionView.xib in Resources */,
 				ADAFD9F72AE68A8500F084BC /* KMCreatPDFView.xib in Resources */,
 				89E4E77C2967B370002DBA6F /* KMDynamicStampViewController.xib in Resources */,
 				89316855296E45CA0073EA59 /* KMImageAccessoryController.xib in Resources */,
@@ -9190,6 +9259,7 @@
 				BBFBE6C528DD7B98008B2335 /* Main.storyboard in Resources */,
 				9F0201752A1B488C00C9B673 /* KMAITranslationVC.xib in Resources */,
 				9F0201812A1BAC1600C9B673 /* KMAIRewritingVC.xib in Resources */,
+				AD85D1B02AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib in Resources */,
 				ADE3C1E729A5ABC200793B13 /* KMLoginWindowController.xib in Resources */,
 				9FD0FA2C29CD3ED400F2AB0D /* KMRightSideEmptyVC.xib in Resources */,
 				9F8539F92947137500DF644E /* newtab_p.pdf in Resources */,
@@ -9279,6 +9349,7 @@
 				BBC348472956A638008D2CD1 /* KMEditBackgroundController.xib in Resources */,
 				BB49ECFA293F44DC00C82CA2 /* KMConvertExcelWindowController.xib in Resources */,
 				89E4E7862967BF5A002DBA6F /* KMCustomizeStampViewController.xib in Resources */,
+				AD85D1BE2AF0D2DD000F4D28 /* KMHomeQuickToolsCollectionView.xib in Resources */,
 				BBA19F3729ADACC5001A285A /* signPicture_nor.pdf in Resources */,
 				89E4E76529656A88002DBA6F /* KMAnnotationStampViewController.xib in Resources */,
 				ADE3C1E829A5ABC200793B13 /* KMLoginWindowController.xib in Resources */,
@@ -9444,6 +9515,8 @@
 				9F1F82E72934D5240092C4B4 /* KMHomeExtractActionViewController.xib in Resources */,
 				9F0CB49329683DEE00007028 /* KMPropertiesPanelLineSubVC.xib in Resources */,
 				BB8F454B295A9CDC0037EA22 /* KMHeaderFooterListController.xib in Resources */,
+				AD85D1B12AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib in Resources */,
+				AD85D1A82AF09864000F4D28 /* KMHomeQuickToolsWindowController.xib in Resources */,
 				BB69C95D299116FD0001A9B1 /* five_line_score.pdf in Resources */,
 				8942F7FC2926089200389627 /* KMSignatureViewController.xib in Resources */,
 				9F080B18298CFDB300FC27DA /* KMTextImageButtonVC.xib in Resources */,
@@ -9545,6 +9618,7 @@
 				ADEC7A83299397F8009A8256 /* SF-Pro-Text-Regular.otf in Resources */,
 				9FD0FA2E29CD3ED400F2AB0D /* KMRightSideEmptyVC.xib in Resources */,
 				9F94748129FA24200042F949 /* Credits.rtf in Resources */,
+				AD85D1A92AF09864000F4D28 /* KMHomeQuickToolsWindowController.xib in Resources */,
 				BB49ED03293F459500C82CA2 /* KMConvertPPTsWindowController.xib in Resources */,
 				BB89723F294B3C840045787C /* KMWatermarkPropertyController.xib in Resources */,
 				BB49ECFB293F44DC00C82CA2 /* KMConvertExcelWindowController.xib in Resources */,
@@ -9572,6 +9646,7 @@
 				89E4E6E82963CD82002DBA6F /* KMGeneralAnnotationViewController.xib in Resources */,
 				ADAFDA0F2AE8DD6600F084BC /* KMAdvertisementCollectionViewItem.xib in Resources */,
 				BBEC00D6295C33D600A26C98 /* KMCreateBatesController.xib in Resources */,
+				AD85D1BF2AF0D2DD000F4D28 /* KMHomeQuickToolsCollectionView.xib in Resources */,
 				ADAFD9F92AE68A8500F084BC /* KMCreatPDFView.xib in Resources */,
 				9F1F82E82934D5240092C4B4 /* KMHomeExtractActionViewController.xib in Resources */,
 				F3B7DF9F2948565000333201 /* CPDFListHoverAnnotationViewController.xib in Resources */,
@@ -9813,6 +9888,7 @@
 				896DD45A2985FB3200ADE514 /* KMPageDisplayThemeCollectionViewItem.xib in Resources */,
 				9F00CCBB2A2F1E0F00AC462E /* dsa_priv.pem in Resources */,
 				9F0CB46C2967E5CB00007028 /* KMPropertiesPanelSubViewController.xib in Resources */,
+				AD85D1B22AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib in Resources */,
 				BBC348482956A638008D2CD1 /* KMEditBackgroundController.xib in Resources */,
 				BB52372C29C313CA00663BD7 /* KMAnnotationPropertyBaseController.xib in Resources */,
 				F3B7DFA62949C8E300333201 /* CPDFListView.xcassets in Resources */,
@@ -10103,6 +10179,7 @@
 				BBF38A5E294F42FF0086D025 /* KMWatermarkAdjectiveStepper.swift in Sources */,
 				BB1EC7FE2967B26700EC0BC3 /* KMPDFEditViewController.swift in Sources */,
 				BB5F8A1F29BB15AD00365ADB /* KMEmailSubWindowController.m in Sources */,
+				AD85D1AD2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift in Sources */,
 				AD68783329A60FA7005B5210 /* KMLoginView.swift in Sources */,
 				ADC63E3F2A49816900854E02 /* KMSubscribeSuccessView.swift in Sources */,
 				9F0CB531298656EA00007028 /* KMDesignToken+BorderWidthBottom.swift in Sources */,
@@ -10153,6 +10230,7 @@
 				BB146FCC299DC0D100784A6A /* GTMSessionUploadFetcher.m in Sources */,
 				BB14701D299DC0D100784A6A /* OIDIDToken.m in Sources */,
 				BB86C1F228F54535005AD968 /* CPDFListView+KeyEvent.m in Sources */,
+				AD85D1B52AF0CCFC000F4D28 /* KMHomeHistoryListViewModel.swift in Sources */,
 				F37322F3292DF9410013862C /* CSelfSignAnnotationFreeText.m in Sources */,
 				9F1FE4D829406E4700E952CA /* NSString+Utils.m in Sources */,
 				BB6DD81829348A00001F0544 /* KMSecureEncryptComboBoxCellView.swift in Sources */,
@@ -10216,6 +10294,7 @@
 				BBD1F798296FF78C00343885 /* KMPageEditSettingBaseModel.swift in Sources */,
 				9FAAA33E290FECA70046FFCE /* NSImage+QuickLook.swift in Sources */,
 				ADE3C1E429A5ABC200793B13 /* KMLoginWindowController.swift in Sources */,
+				AD85D1B92AF0D2CA000F4D28 /* KMHomeQuickToolsCollectionView.swift in Sources */,
 				BBBB6CDE2AD174080035AA66 /* CPDFInkAnnotation+PDFListView.swift in Sources */,
 				9F0CB4D52986551600007028 /* KMDesignToken+Spacing.swift in Sources */,
 				BBBB6CCA2AD109F30035AA66 /* CPDFAnnotation+PDFListView.swift in Sources */,
@@ -10502,7 +10581,6 @@
 				BB31981A2AC567B500107371 /* CPDFSelection+PDFListView.swift in Sources */,
 				ADB5E5122A371131007110A8 /* KMSubscribeWaterMarkWindowController.swift in Sources */,
 				BBC4F9EA2AEB58290098A1A8 /* KMAlertWindowController.swift in Sources */,
-				89752D9F2936EC50003FF08E /* KMToolbar.m in Sources */,
 				BB147011299DC0D100784A6A /* OIDError.m in Sources */,
 				89752DEA293875FC003FF08E /* KMMainToolbarController.swift in Sources */,
 				BBA93D2D29BEBAA60044E0DD /* KMPreferenceEnum.swift in Sources */,
@@ -10613,6 +10691,7 @@
 				BBBB6CD22AD14A5F0035AA66 /* CPDFChoiceWidgetAnnotation+PDFListView.swift in Sources */,
 				9F1FE3DE293EE51F00E952CA /* KMMainDocument.swift in Sources */,
 				9F0201962A1F352100C9B673 /* KMAITranslationConfirmWindowController.swift in Sources */,
+				AD85D1A42AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift in Sources */,
 				BBF2455D2AE78FF900037D08 /* KMBatchWindow.swift in Sources */,
 				BBB9B31F299A5D6D004F3235 /* KMGoogleDriveManager.m in Sources */,
 				BB1BFF8E2AEA547B003EB179 /* NSButton+CustomAppearance.swift in Sources */,
@@ -10702,6 +10781,7 @@
 				ADC63E402A49816900854E02 /* KMSubscribeSuccessView.swift in Sources */,
 				BBF38A63294F53FD0086D025 /* KMWatermarkFileView.swift in Sources */,
 				AD2D74B629F0D39500EDC5E4 /* KMCancellationSuccessView.swift in Sources */,
+				AD85D1B62AF0CCFC000F4D28 /* KMHomeHistoryListViewModel.swift in Sources */,
 				9F080B24298FCB0D00FC27DA /* KMDesignToken+Action.swift in Sources */,
 				BB1BFF932AEA6352003EB179 /* KMImageToPDFMethod.swift in Sources */,
 				F37322F4292DF9410013862C /* CSelfSignAnnotationFreeText.m in Sources */,
@@ -11001,6 +11081,7 @@
 				9F0CB4FA298655E500007028 /* KMDesignToken+Border.swift in Sources */,
 				ADD1B6E92946C02600C3FFF7 /* KMPrintChoosePageSizeMultipageView.swift in Sources */,
 				9F0CB4602966C9E200007028 /* KMFormPropertPanelViewController.swift in Sources */,
+				AD85D1AE2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift in Sources */,
 				BB6719F62AD2C949003D44D5 /* CPDFRedactAnnotation+PDFListView.swift in Sources */,
 				ADCFFC0329C004AD007D3657 /* KMBookMarkTableRowView.swift in Sources */,
 				ADDEEA872AD7805200EF675D /* KMGeneralButton.swift in Sources */,
@@ -11156,6 +11237,7 @@
 				ADBC375E29CC61E100D93208 /* KMReadModelView.swift in Sources */,
 				BB2EDF7A296ECE17003BCF58 /* KMPageEditThumbnailItem.swift in Sources */,
 				9FBA0EF628FFC8A0001117AF /* KMCollectionView.swift in Sources */,
+				AD85D1A52AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift in Sources */,
 				ADD1B7072946CBB600C3FFF7 /* KMBaseTextFormatter.swift in Sources */,
 				BB8F4573295ACE380037EA22 /* KMHeaderFooterAdjectiveListCell.swift in Sources */,
 				BBD54ED52A1CBD720012A230 /* NSView+KMExtension.swift in Sources */,
@@ -11249,6 +11331,7 @@
 				BB1CA5C7298E20820059E31C /* KMPreferenceAligementView.swift in Sources */,
 				BBEB93F02AD6C72C00739573 /* KMPDFMergePageRangeTabelViewCell.swift in Sources */,
 				9F8539D32943121100DF644E /* KMSegmentedBox.swift in Sources */,
+				AD85D1BA2AF0D2CA000F4D28 /* KMHomeQuickToolsCollectionView.swift in Sources */,
 				AD9527C3295294EF0039D2BC /* KMPrintPaperModel.swift in Sources */,
 				9FD0D2A42AD4ECA900DA3FF8 /* KMPDFEditAppendCustomView.swift in Sources */,
 				BBBF68852A3C3AF10058E14E /* NSDocumentController+KMExtension.swift in Sources */,
@@ -11593,6 +11676,7 @@
 				BB003011298CA383002DD1A0 /* KMPreferenceSegementControl.swift in Sources */,
 				BBBB6CD42AD14A5F0035AA66 /* CPDFChoiceWidgetAnnotation+PDFListView.swift in Sources */,
 				9F8539D82943180000DF644E /* KMTabAppearance.swift in Sources */,
+				AD85D1BB2AF0D2CA000F4D28 /* KMHomeQuickToolsCollectionView.swift in Sources */,
 				9FDD0F6D294AD12C000C4DAD /* KMMainViewController+UI.swift in Sources */,
 				BB1BFF902AEA547B003EB179 /* NSButton+CustomAppearance.swift in Sources */,
 				9FD0D2B12AD51BCC00DA3FF8 /* CPDFListEditAnnotationViewController.swift in Sources */,
@@ -12026,6 +12110,7 @@
 				BB3198202AC57ACA00107371 /* CPDFPage+PDFListView.swift in Sources */,
 				9FCFEC822AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift in Sources */,
 				BB2EDF4E296E63E5003BCF58 /* KMPageEditInsertCustomPageWindowController.swift in Sources */,
+				AD85D1AF2AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.swift in Sources */,
 				BBB7B48B2A033F6200B58A5A /* KMThumbnailView.swift in Sources */,
 				9FBA0EF728FFC8A0001117AF /* KMCollectionView.swift in Sources */,
 				BB897226294B07960045787C /* KMWatermarkAdjectiveTopBarItemView.swift in Sources */,
@@ -12058,6 +12143,7 @@
 				BB3A81B22AC2B82A006FC66C /* KMPageSizeTool.swift in Sources */,
 				9FD0D2A52AD4ECA900DA3FF8 /* KMPDFEditAppendCustomView.swift in Sources */,
 				ADAFDA4A2AEA7F1300F084BC /* KMAdvertisementShowView.swift in Sources */,
+				AD85D1B72AF0CCFC000F4D28 /* KMHomeHistoryListViewModel.swift in Sources */,
 				AD8F06192999DB5900D93CBC /* KMPrintDrawPage.swift in Sources */,
 				9FF94F1B29A770B500B1EF69 /* KMFillSignShapePanel.swift in Sources */,
 				BBA5429E29F13A140041BAD0 /* KMMemorandumPattern.swift in Sources */,
@@ -12088,6 +12174,7 @@
 				BBB1A3A829F6B66400E54E47 /* NSPanel+KMExtension.swift in Sources */,
 				AD867FB129DFBB1200F00440 /* KMAnnotationOutlineCellView.swift in Sources */,
 				9F1FE50129406E4700E952CA /* CTTabStripModel.m in Sources */,
+				AD85D1A62AF09864000F4D28 /* KMHomeQuickToolsWindowController.swift in Sources */,
 				BB35C4A12975362900D46EE2 /* KMRedactTopToolBar.swift in Sources */,
 				AD8810B429A846B100178CA1 /* KMVerficationCodeWindowController.swift in Sources */,
 				9F1FE4CB29406E4700E952CA /* CTTabContents.m in Sources */,

File diff suppressed because it is too large
+ 293 - 183
PDF Office/PDF Master.xcodeproj/xcuserdata/lizhe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist


+ 81 - 78
PDF Office/PDF Master/Class/Home/View/HomeContentView/History/Cell/KMHomeHistoryCollectionItem.swift

@@ -52,6 +52,9 @@ class KMHomeHistoryCollectionItem: NSCollectionViewItem {
     override func viewDidLoad() {
         super.viewDidLoad()
         // Do view setup here.
+        // 使用自动布局设置 item 宽度等于父视图的宽度
+       view.translatesAutoresizingMaskIntoConstraints = false
+        
         self.setup()
     }
 
@@ -125,87 +128,87 @@ extension KMHomeHistoryCollectionItem {
     func updateFilesData() -> Void {
         guard let fileUrl = url else { return }
         
-        let attrib = try? FileManager.default.attributesOfItem(atPath: fileUrl.path) as? Dictionary<FileAttributeKey , Any>
-        if attrib != nil {
-            let dateFormatter: DateFormatter = DateFormatter.init()
-            let fileDate: Date = attrib![FileAttributeKey(rawValue: "NSFileModificationDate")] as! Date
-            var fileTime: String = ""
-            if fileDate.isToday() {
-                dateFormatter.dateFormat = "HH:mm"
-            } else if self.isDateInCurrentWeek(fileDate) {
-                dateFormatter.dateFormat = "EEE, HH:mm"
-            } else {
-                dateFormatter.dateFormat = "MMM d, yyyy"
-            }
-            
-            let fileName = fileUrl.lastPathComponent
-//            let fileType = url.pathExtension.isEmpty ? "" : url.pathExtension
-            let fileType = ""
-            let sizeFloat: Float = attrib![FileAttributeKey(rawValue: "NSFileSize")] as? Float ?? 0.0
-            let fileSize = fileSizeString(sizeFloat).isEmpty ? "" : fileSizeString(sizeFloat)
-            let lastTime = dateFormatter.string(from: fileDate)
-            if fileDate.isToday() {
-                fileTime = String(format: "%@, %@", NSLocalizedString("Today", comment: ""), lastTime)
-            } else if isDateInCurrentWeek(fileDate) {
-                fileTime = lastTime
-            } else {
-                fileTime = lastTime
-            }
-
-            let paragraphStyle = NSMutableParagraphStyle()
-            paragraphStyle.lineSpacing = 22.0
-            horizontalTitleLabel.stringValue = fileName
-            verticalTitleLabel.stringValue = fileName
-            
-            //path
-            let array = fileUrl.path
-                .deletingLastPathComponent
-                .components(separatedBy: "/")
-            let string = NSMutableString()
-
-            if array.count > 4 {
-                string.append(".../")
-                string.append(array[array.count - 3])
-                string.append("/")
-                string.append(array[array.count - 2])
-                string.append("/")
-                string.append(array[array.count - 1])
-            } else {
-                string.setString(fileUrl.path.deletingLastPathComponent)
-            }
-
-            pathLabel.stringValue = string as String
-            
-    //        documentName.attributedStringValue = NSAttributedString(string: fileName, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
-//            documentType.attributedStringValue = NSAttributedString(string: fileType, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
-            sizeLabel.attributedStringValue = NSAttributedString(string: fileSize, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
-            timeLabel.attributedStringValue = NSAttributedString(string: fileTime, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
-//            mainBox.toolTip = fileName
+//        let attrib = try? FileManager.default.attributesOfItem(atPath: fileUrl.path) as? Dictionary<FileAttributeKey , Any>
+//        if attrib != nil {
+//            let dateFormatter: DateFormatter = DateFormatter.init()
+//            let fileDate: Date = attrib![FileAttributeKey(rawValue: "NSFileModificationDate")] as! Date
+//            var fileTime: String = ""
+//            if fileDate.isToday() {
+//                dateFormatter.dateFormat = "HH:mm"
+//            } else if self.isDateInCurrentWeek(fileDate) {
+//                dateFormatter.dateFormat = "EEE, HH:mm"
+//            } else {
+//                dateFormatter.dateFormat = "MMM d, yyyy"
+//            }
 //            
-//            if selectUrls.contains(fileUrl) {
-//                isSelect = true
-//                mainBox.fillColor = NSColor.km_init(hex: "#CED0D4", alpha: 0.6)
-//                mainBox.borderWidth = 1.0
-//                mainBox.borderColor = NSColor.km_init(hex: "#CED0D4")
-//                mainBox.cornerRadius = 4.0
+//            let fileName = fileUrl.lastPathComponent
+////            let fileType = url.pathExtension.isEmpty ? "" : url.pathExtension
+//            let fileType = ""
+//            let sizeFloat: Float = attrib![FileAttributeKey(rawValue: "NSFileSize")] as? Float ?? 0.0
+//            let fileSize = fileSizeString(sizeFloat).isEmpty ? "" : fileSizeString(sizeFloat)
+//            let lastTime = dateFormatter.string(from: fileDate)
+//            if fileDate.isToday() {
+//                fileTime = String(format: "%@, %@", NSLocalizedString("Today", comment: ""), lastTime)
+//            } else if isDateInCurrentWeek(fileDate) {
+//                fileTime = lastTime
 //            } else {
-//                isSelect = false
-//                mainBox.fillColor = .clear
-//                mainBox.borderWidth = 0.0
-//                mainBox.cornerRadius = 0.0
+//                fileTime = lastTime
 //            }
-//            documentName.backgroundColor = .clear
-//            documentName.textColor = NSColor.km_init(hex: "#252629")
-//            documentName.font = NSFont(name: "SFProText-Regular", size: 14)
-//            documentType.textColor = NSColor.km_init(hex: "#94989C")
-//            documentSize.textColor = NSColor.km_init(hex: "#94989C")
-//            documentName.backgroundColor = .clear
-//            lastModificationTime.textColor = NSColor.km_init(hex: "#94989C")
-//            lastModificationTime.backgroundColor = .clear
-//            moreButton.image = NSImage(named: "KMHomeMoreTools")
-            let image: NSImage = NSImage.previewForFile(path: fileUrl, ofSize: self.view.bounds.size, asIcon: true) ?? NSImage()
-            showImageView.image = image
-        }
+//
+//            let paragraphStyle = NSMutableParagraphStyle()
+//            paragraphStyle.lineSpacing = 22.0
+//            horizontalTitleLabel.stringValue = fileName
+//            verticalTitleLabel.stringValue = fileName
+//            
+//            //path
+//            let array = fileUrl.path
+//                .deletingLastPathComponent
+//                .components(separatedBy: "/")
+//            let string = NSMutableString()
+//
+//            if array.count > 4 {
+//                string.append(".../")
+//                string.append(array[array.count - 3])
+//                string.append("/")
+//                string.append(array[array.count - 2])
+//                string.append("/")
+//                string.append(array[array.count - 1])
+//            } else {
+//                string.setString(fileUrl.path.deletingLastPathComponent)
+//            }
+//
+//            pathLabel.stringValue = string as String
+//            
+//    //        documentName.attributedStringValue = NSAttributedString(string: fileName, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
+////            documentType.attributedStringValue = NSAttributedString(string: fileType, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
+//            sizeLabel.attributedStringValue = NSAttributedString(string: fileSize, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
+//            timeLabel.attributedStringValue = NSAttributedString(string: fileTime, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle])
+////            mainBox.toolTip = fileName
+////            
+////            if selectUrls.contains(fileUrl) {
+////                isSelect = true
+////                mainBox.fillColor = NSColor.km_init(hex: "#CED0D4", alpha: 0.6)
+////                mainBox.borderWidth = 1.0
+////                mainBox.borderColor = NSColor.km_init(hex: "#CED0D4")
+////                mainBox.cornerRadius = 4.0
+////            } else {
+////                isSelect = false
+////                mainBox.fillColor = .clear
+////                mainBox.borderWidth = 0.0
+////                mainBox.cornerRadius = 0.0
+////            }
+////            documentName.backgroundColor = .clear
+////            documentName.textColor = NSColor.km_init(hex: "#252629")
+////            documentName.font = NSFont(name: "SFProText-Regular", size: 14)
+////            documentType.textColor = NSColor.km_init(hex: "#94989C")
+////            documentSize.textColor = NSColor.km_init(hex: "#94989C")
+////            documentName.backgroundColor = .clear
+////            lastModificationTime.textColor = NSColor.km_init(hex: "#94989C")
+////            lastModificationTime.backgroundColor = .clear
+////            moreButton.image = NSImage(named: "KMHomeMoreTools")
+//            let image: NSImage = NSImage.previewForFile(path: fileUrl, ofSize: self.view.bounds.size, asIcon: true) ?? NSImage()
+//            showImageView.image = image
+//        }
     }
     
     func fileSizeString(_ fSize: Float) -> String {

+ 15 - 16
PDF Office/PDF Master/Class/Home/View/HomeContentView/History/Cell/KMHomeHistoryCollectionItem.xib

@@ -27,26 +27,25 @@
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="940" height="229"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Hz6-mo-xeY">
+            <rect key="frame" x="0.0" y="0.0" width="618" height="88"/>
             <subviews>
                 <box boxType="custom" borderWidth="0.0" translatesAutoresizingMaskIntoConstraints="NO" id="gvc-kj-Yeo" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                    <rect key="frame" x="16" y="16" width="908" height="197"/>
+                    <rect key="frame" x="16" y="16" width="586" height="56"/>
                     <view key="contentView" id="KgU-86-iwk">
-                        <rect key="frame" x="0.0" y="0.0" width="908" height="197"/>
+                        <rect key="frame" x="0.0" y="0.0" width="586" height="56"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                 </box>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="oc7-Ul-iDs">
-                    <rect key="frame" x="0.0" y="0.0" width="940" height="229"/>
+                    <rect key="frame" x="0.0" y="0.0" width="618" height="88"/>
                     <subviews>
                         <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dbA-sb-Xfk">
-                            <rect key="frame" x="0.0" y="40" width="940" height="189"/>
+                            <rect key="frame" x="0.0" y="40" width="618" height="48"/>
                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="bdV-B5-oJm"/>
                         </imageView>
                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mZL-RM-KzQ">
-                            <rect key="frame" x="14" y="16" width="912" height="16"/>
+                            <rect key="frame" x="14" y="16" width="590" height="16"/>
                             <textFieldCell key="cell" alignment="center" id="Nso-Kd-6li">
                                 <font key="font" metaFont="system"/>
                                 <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -66,10 +65,10 @@
                     </constraints>
                 </customView>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="7sk-7M-lCI">
-                    <rect key="frame" x="0.0" y="0.0" width="940" height="229"/>
+                    <rect key="frame" x="0.0" y="0.0" width="618" height="88"/>
                     <subviews>
                         <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0Mh-Sf-3a2">
-                            <rect key="frame" x="16" y="99" width="32" height="32"/>
+                            <rect key="frame" x="16" y="28" width="32" height="32"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="32" id="Hwu-re-UBO"/>
                                 <constraint firstAttribute="height" constant="32" id="Wiy-fe-sgF"/>
@@ -77,7 +76,7 @@
                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="KMImageNameUXIconPropertybarFilePdf" id="eLO-Yq-M3q"/>
                         </imageView>
                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ddV-aD-Yah">
-                            <rect key="frame" x="54" y="114" width="40" height="17"/>
+                            <rect key="frame" x="54" y="43" width="40" height="17"/>
                             <textFieldCell key="cell" lineBreakMode="truncatingMiddle" alignment="left" title="Label" id="AYN-Fy-tcy">
                                 <font key="font" metaFont="system" size="14"/>
                                 <color key="textColor" name="KMGray6Color"/>
@@ -85,7 +84,7 @@
                             </textFieldCell>
                         </textField>
                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WUP-W3-okM">
-                            <rect key="frame" x="817" y="107" width="109" height="15"/>
+                            <rect key="frame" x="495" y="37" width="109" height="15"/>
                             <textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="2020-08-01 12:39" id="PEF-8C-QEE">
                                 <font key="font" metaFont="cellTitle"/>
                                 <color key="textColor" name="KMGray5Color"/>
@@ -93,7 +92,7 @@
                             </textFieldCell>
                         </textField>
                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Der-Qi-aoW">
-                            <rect key="frame" x="93" y="99" width="35" height="15"/>
+                            <rect key="frame" x="93" y="28" width="35" height="15"/>
                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="2AB-HF-4Ox">
                                 <font key="font" metaFont="cellTitle"/>
                                 <color key="textColor" red="0.39607843139999999" green="0.41176470590000003" blue="0.43921568630000002" alpha="1" colorSpace="calibratedRGB"/>
@@ -101,7 +100,7 @@
                             </textFieldCell>
                         </textField>
                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wId-sm-qtO">
-                            <rect key="frame" x="54" y="99" width="35" height="15"/>
+                            <rect key="frame" x="54" y="28" width="35" height="15"/>
                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Pbe-3u-seE">
                                 <font key="font" metaFont="cellTitle"/>
                                 <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -109,7 +108,7 @@
                             </textFieldCell>
                         </textField>
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="seD-7E-dp2">
-                            <rect key="frame" x="695" y="95" width="100" height="40"/>
+                            <rect key="frame" x="373" y="24" width="100" height="40"/>
                             <subviews>
                                 <button translatesAutoresizingMaskIntoConstraints="NO" id="HSD-uO-oml" customClass="KMButton" customModule="PDF_Master" customModuleProvider="target">
                                     <rect key="frame" x="20" y="10" width="20" height="20"/>
@@ -180,7 +179,7 @@
                 <constraint firstAttribute="bottom" secondItem="oc7-Ul-iDs" secondAttribute="bottom" id="pjN-VI-SK1"/>
                 <constraint firstItem="oc7-Ul-iDs" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="tTF-yE-4ER"/>
             </constraints>
-            <point key="canvasLocation" x="-77" y="122.5"/>
+            <point key="canvasLocation" x="-67" y="194"/>
         </customView>
     </objects>
     <resources>

+ 2 - 2
PDF Office/PDF Master/Class/Home/View/HomeContentView/History/KMHomeHistoryListView.swift

@@ -30,9 +30,9 @@ class KMHomeHistoryListView: KMBaseXibView {
         if dirtyRect.size.width != self.bounds.size.width {
             let indexPathsToReload = Set([IndexPath(item: 0, section: 0)/*, IndexPath(item: 1, section: 0)*/]) // 要刷新的单元项的索引路径
             collectionView.reloadItems(at: indexPathsToReload)
+//            collectionView.updateLayer()
         }
         super.draw(dirtyRect)
-
     }
     
     override func setup() {
@@ -101,7 +101,7 @@ extension KMHomeHistoryListView: NSCollectionViewDataSource {
         if self.data.count > indexPath.item {
             view.url = self.data[indexPath.item]
         }
-        
+    
         view.mouseDobleClickAction = {[unowned self] view, url in
             guard let callBack = didSelect else { return }
             

+ 12 - 0
PDF Office/PDF Master/Class/Home/View/HomeContentView/History/Model/KMHomeHistoryListViewModel.swift

@@ -0,0 +1,12 @@
+//
+//  KMHomeHistoryListViewModel.swift
+//  PDF Master
+//
+//  Created by lizhe on 2023/10/31.
+//
+
+import Cocoa
+
+class KMHomeHistoryListViewModel: NSObject {
+
+}

+ 8 - 1
PDF Office/PDF Master/Class/Home/View/HomeContentView/KMHomeContentView.swift

@@ -47,7 +47,14 @@ extension KMHomeContentView {
     }
     
     @IBAction func moreButtonAction(_ sender: Any) {
-        
+        let homeQuickToolsWindowController: KMHomeQuickToolsWindowController = KMHomeQuickToolsWindowController.sharedHomeQuickTools
+        homeQuickToolsWindowController.window?.center()
+//        homeQuickToolsWindowController.window?.orderFront(sender)
+        NSWindow.currentWindow().addChildWindow(homeQuickToolsWindowController.window!, ordered: NSWindow.OrderingMode.above)
+//        NSWindow.currentWindow().beginSheet(homeQuickToolsWindowController.window!)
+        homeQuickToolsWindowController.dataChange = { [unowned self] controller in
+            self.qucikToolsView.reloadData()
+        }
     }
 }
 

+ 1 - 1
PDF Office/PDF Master/Class/Home/View/HomeContentView/QucikTools/KMQucikToolsView.swift

@@ -39,7 +39,7 @@ class KMQucikToolsView: KMBaseXibView {
     override func reloadData() {
         self.data.removeAll()
         
-        for type in KMQucikToolsModel.allType() {
+        for type in KMQucikToolsModel.showType() {
             self.data.append(KMQucikToolsModel.init(type: type))
         }
         self.collectionView.reloadData()

+ 80 - 24
PDF Office/PDF Master/Class/Home/View/HomeContentView/QucikTools/Model/KMQucikToolsModel.swift

@@ -19,6 +19,35 @@ class KMQucikToolsModel: NSObject {
         return array
     }
     
+    static func showType() -> [DataNavigationViewButtonActionType] {
+        if UserDefaults.standard.object(forKey: "kQucikToolsShowType") != nil {
+            let array: [NSNumber] = UserDefaults.standard.object(forKey: "kQucikToolsShowType") as! [NSNumber]
+            if array.count != 0 {
+                var types: [DataNavigationViewButtonActionType] = []
+                for index in array {
+                    types.append(DataNavigationViewButtonActionType(rawValue: Int(truncating: index))!)
+                }
+                return types
+            } else {
+                return self.allType()
+            }
+        } else {
+            return self.allType()
+        }
+    }
+    
+    static func hiddenType() -> [DataNavigationViewButtonActionType] {
+        let allTypes = self.allType()
+        let showTypes = self.showType()
+        
+        return allTypes.filter { !showTypes.contains($0) }
+    }
+    
+    static func saveShowType(data: [NSNumber]) {
+        UserDefaults.standard.setValue(data, forKey: "kQucikToolsShowType")
+        UserDefaults.standard.synchronize()
+    }
+    
     func titleString() -> String {
         var string = ""
         
@@ -81,32 +110,59 @@ class KMQucikToolsModel: NSObject {
         return string
     }
     
-    func iconImage() -> NSImage {
+    func iconImage(_ isHight: Bool = false) -> NSImage {
         var string = ""
         
-        switch self.type {
-        case .ConvertPDF: string = "KMImageNameUXIconHomeQuicktoolConvertNor"
-        case .PDFToWord: string = "KMImageNameUXIconHomeQuicktoolWordNor"
-        case .PDFToExcel: string = "KMImageNameUXIconHomeQuicktoolExcelNor"
-        case .PDFToPPT: string = "KMImageNameUXIconHomeQuicktoolPPTNor"
-        case .ImageToPDF: string = "KMImageNameUXIconHomeQuicktoolPdftoimgNor"
-        case .OCR: string = "KMImageNameUXIconHomeQuicktoolOcrNor"
-        case .PageEdit: string = "KMImageNameUXIconHomeQuicktoolPageeditNor"
-        case .MergePDF: string = "KMImageNameUXIconHomeQuicktoolMergeNor"
-        case .BreakUp: string = "KMImageNameUXIconHomeQuicktoolSplitNor"
-        case .Insert: string = "KMImageNameUXIconHomeQuicktoolInsertNor"
-        case .Compression: string = "KMImageNameUXIconHomeQuicktoolComprison"
-        case .Security: string = "KMImageNameUXIconHomeQuicktoolSafeNor"
-        case .Watermark: string = "KMImageNameUXIconHomeQuicktoolWatermarkNor"
-        case .Background: string = "KMImageNameUXIconHomeQuicktoolBackgroundNor"
-        case .HeaderAndFooter: string = "KMImageNameUXIconHomeQuicktoolHeaderandfooterNor"
-        case .BatesCode: string = "KMImageNameUXIconHomeQuicktoolBatesNor"
-//        case .Print: string = "KMImageNameUXIconHomeQuicktoolPosterNor"
-//        case .Print: string = "KMImageNameUXIconHomeQuicktoolMultipageNor"
-//        case .Print: string = "KMImageNameUXIconHomeQuicktoolBookNor"
-        case .Batch: string = "KMImageNameUXIconHomeQuicktoolBatchNor"
-        case .FileCompare: string = "KMHomeQuickToolsItemTypePDFComparison"
-        default: string = ""
+        if isHight {
+            switch self.type {
+            case .ConvertPDF: string = "KMImageNameUXIconHomeQuicktoolConvertHov"
+            case .PDFToWord: string = "KMImageNameUXIconHomeQuicktoolWordHov"
+            case .PDFToExcel: string = "KMImageNameUXIconHomeQuicktoolExcelHov"
+            case .PDFToPPT: string = "KMImageNameUXIconHomeQuicktoolPPTHov"
+            case .ImageToPDF: string = "KMImageNameUXIconHomeQuicktoolPdftoimgHov"
+            case .OCR: string = "KMImageNameUXIconHomeQuicktoolOcrHov"
+            case .PageEdit: string = "KMImageNameUXIconHomeQuicktoolPageeditHov"
+            case .MergePDF: string = "KMImageNameUXIconHomeQuicktoolMergeHov"
+            case .BreakUp: string = "KMImageNameUXIconHomeQuicktoolSplitHov"
+            case .Insert: string = "KMImageNameUXIconHomeQuicktoolInsertHov"
+            case .Compression: string = "KMImageNameUXIconHomeQuicktoolOptimizeHov"
+            case .Security: string = "KMImageNameUXIconHomeQuicktoolSafeHov"
+            case .Watermark: string = "KMImageNameUXIconHomeQuicktoolWatermarkHov"
+            case .Background: string = "KMImageNameUXIconHomeQuicktoolBackgroundHov"
+            case .HeaderAndFooter: string = "KMImageNameUXIconHomeQuicktoolHeaderandfooterHov"
+            case .BatesCode: string = "KMImageNameUXIconHomeQuicktoolBatesHov"
+    //        case .Print: string = "KMImageNameUXIconHomeQuicktoolPosterHov"
+    //        case .Print: string = "KMImageNameUXIconHomeQuicktoolMultipageHov"
+    //        case .Print: string = "KMImageNameUXIconHomeQuicktoolBookHov"
+            case .Batch: string = "KMImageNameUXIconHomeQuicktoolBatchHov"
+            case .FileCompare: string = "KMHomeQuickToolsItemTypePDFComparison"
+            default: string = ""
+            }
+        } else {
+            switch self.type {
+            case .ConvertPDF: string = "KMImageNameUXIconHomeQuicktoolConvertNor"
+            case .PDFToWord: string = "KMImageNameUXIconHomeQuicktoolWordNor"
+            case .PDFToExcel: string = "KMImageNameUXIconHomeQuicktoolExcelNor"
+            case .PDFToPPT: string = "KMImageNameUXIconHomeQuicktoolPPTNor"
+            case .ImageToPDF: string = "KMImageNameUXIconHomeQuicktoolPdftoimgNor"
+            case .OCR: string = "KMImageNameUXIconHomeQuicktoolOcrNor"
+            case .PageEdit: string = "KMImageNameUXIconHomeQuicktoolPageeditNor"
+            case .MergePDF: string = "KMImageNameUXIconHomeQuicktoolMergeNor"
+            case .BreakUp: string = "KMImageNameUXIconHomeQuicktoolSplitNor"
+            case .Insert: string = "KMImageNameUXIconHomeQuicktoolInsertNor"
+            case .Compression: string = "KMImageNameUXIconHomeQuicktoolOptimizeNor"
+            case .Security: string = "KMImageNameUXIconHomeQuicktoolSafeNor"
+            case .Watermark: string = "KMImageNameUXIconHomeQuicktoolWatermarkNor"
+            case .Background: string = "KMImageNameUXIconHomeQuicktoolBackgroundNor"
+            case .HeaderAndFooter: string = "KMImageNameUXIconHomeQuicktoolHeaderandfooterNor"
+            case .BatesCode: string = "KMImageNameUXIconHomeQuicktoolBatesNor"
+    //        case .Print: string = "KMImageNameUXIconHomeQuicktoolPosterNor"
+    //        case .Print: string = "KMImageNameUXIconHomeQuicktoolMultipageNor"
+    //        case .Print: string = "KMImageNameUXIconHomeQuicktoolBookNor"
+            case .Batch: string = "KMImageNameUXIconHomeQuicktoolBatchNor"
+            case .FileCompare: string = "KMHomeQuickToolsItemTypePDFComparison"
+            default: string = ""
+            }
         }
             
         return NSImage(named: string) ?? NSImage()

+ 38 - 0
PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/KMHomeQuickToolsWindowController.swift

@@ -0,0 +1,38 @@
+//
+//  KMHomeQuickToolsWindowController.swift
+//  PDF Master
+//
+//  Created by lizhe on 2023/10/31.
+//
+
+import Cocoa
+
+typealias KMHomeQuickToolsWindowControllerDataDidChange = (_ controller: KMHomeQuickToolsWindowController) ->Void
+
+class KMHomeQuickToolsWindowController: NSWindowController {
+    @IBOutlet weak var collectionView: KMHomeQuickToolsCollectionView!
+    static var sharedHomeQuickTools: KMHomeQuickToolsWindowController = KMHomeQuickToolsWindowController.init(windowNibName: NSNib.Name("KMHomeQuickToolsWindowController"))
+
+    var dataChange: KMHomeQuickToolsWindowControllerDataDidChange?
+    override func windowDidLoad() {
+        let showType = KMQucikToolsModel.showType()
+        var showTypeArray: [NSNumber] = []
+        for index in showType {
+            showTypeArray.append(index.rawValue as NSNumber)
+        }
+        
+        let hiddenType = KMQucikToolsModel.hiddenType()
+        var hiddenTypeArray: [NSNumber] = []
+        for index in hiddenType {
+            hiddenTypeArray.append(index.rawValue as NSNumber)
+        }
+        collectionView.showData(showArr: showTypeArray, hideArr: hiddenTypeArray)
+        
+        collectionView.dataChange = { [unowned self] view, showData in
+            KMQucikToolsModel.saveShowType(data: showData)
+            
+            guard let callBack =  dataChange else { return  }
+            callBack(self)
+        }
+    }
+}

+ 43 - 0
PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/KMHomeQuickToolsWindowController.xib

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMHomeQuickToolsWindowController" customModule="PDF_Master" customModuleProvider="target">
+            <connections>
+                <outlet property="collectionView" destination="C6x-yX-ikY" id="ddt-SK-h37"/>
+                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="F0z-JX-Cv5">
+            <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="600" height="371"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
+            <view key="contentView" id="se5-gp-TjO">
+                <rect key="frame" x="0.0" y="0.0" width="600" height="371"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="C6x-yX-ikY" customClass="KMHomeQuickToolsCollectionView" customModule="PDF_Master" customModuleProvider="target">
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="371"/>
+                    </customView>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="C6x-yX-ikY" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="ADK-cL-ZUw"/>
+                    <constraint firstAttribute="bottom" secondItem="C6x-yX-ikY" secondAttribute="bottom" id="aeL-eu-GgP"/>
+                    <constraint firstAttribute="trailing" secondItem="C6x-yX-ikY" secondAttribute="trailing" id="bYv-ZF-KGr"/>
+                    <constraint firstItem="C6x-yX-ikY" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="sZW-Hi-1Eo"/>
+                </constraints>
+            </view>
+            <connections>
+                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
+            </connections>
+            <point key="canvasLocation" x="-318" y="9"/>
+        </window>
+    </objects>
+</document>

+ 411 - 0
PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/View/KMHomeQuickToolsCollectionView.swift

@@ -0,0 +1,411 @@
+//
+//  KMHomeQuickToolsCollectionView.swift
+//  PDF Master
+//
+//  Created by lizhe on 2023/10/31.
+//
+
+import Cocoa
+
+typealias KMHomeQuickToolsCollectionViewDataDidChange = (_ view: KMHomeQuickToolsCollectionView, _ showData: [NSNumber]) ->Void
+
+class KMHomeQuickToolsCollectionView: KMBaseXibView {
+    @IBOutlet weak var showBox: NSBox!
+    @IBOutlet weak var showLabel: NSTextField!
+    @IBOutlet weak var removeBox: NSBox!
+    @IBOutlet weak var removeButton: NSButton!
+    @IBOutlet weak var removeButtonLayoutConstraint: NSLayoutConstraint!
+    @IBOutlet weak var showCollectionView: NSCollectionView!
+    @IBOutlet weak var showScrollView: NSScrollView!
+    
+    @IBOutlet weak var hideBox: NSBox!
+    @IBOutlet weak var hideLabel: NSTextField!
+    @IBOutlet weak var addBox: NSBox!
+    @IBOutlet weak var addButton: NSButton!
+    @IBOutlet weak var addButtonLayoutConstraint: NSLayoutConstraint!
+    @IBOutlet weak var hideCollectionView: NSCollectionView!
+    @IBOutlet weak var hideScrollView: NSScrollView!
+    
+    @IBOutlet weak var promptLabel: NSTextField!
+    @IBOutlet weak var showCollectionBox: NSBox!
+    @IBOutlet weak var hideCollectionBox: NSBox!
+    
+    var dataChange: KMHomeQuickToolsCollectionViewDataDidChange?
+    
+    var indexPathsOfItemsBeingShowItemDragged: Set<IndexPath> = []
+    var indexPathsOfItemsBeingHideItemDragged: Set<IndexPath> = []
+    
+    var showArray: [NSNumber] = []
+    var hideArray: [NSNumber] = []
+    var selectShowItemMutableArray: [IndexPath] = []
+    var selectHideItemMutableArray: [IndexPath] = []
+    var collectionItemWidth: CGFloat = 0
+    let collectionItemHeight: CGFloat = 32
+    
+    override func setup() {
+        self.window?.title = NSLocalizedString("Advanced Editing Tools", comment: "")
+
+        showLabel.stringValue = NSLocalizedString("Show", comment: "")
+        hideLabel.stringValue = NSLocalizedString("Hide", comment: "")
+        removeButton.title = NSLocalizedString("Remove", comment: "")
+        addButton.title = NSLocalizedString("Add", comment: "")
+        promptLabel.stringValue = NSLocalizedString("Drag and drop to add, remove, and reorder the tools.", comment: "")
+        promptLabel.textColor = KMAppearance.Layout.h1Color()
+
+        showScrollView.drawsBackground = false
+        hideScrollView.drawsBackground = false
+
+        removeBox.borderColor = NSColor.gridColor
+        addBox.borderColor = NSColor.gridColor
+        removeBox.fillColor = NSColor.gridColor
+        addBox.fillColor = NSColor.gridColor
+        removeButton.isEnabled = false
+        addButton.isEnabled = false
+
+        let removeButtonConstant = labelReturnedValue(withString: NSLocalizedString("Remove", comment: ""), height: 20, fontSize: 11.0)
+        let addButtonConstant = labelReturnedValue(withString:NSLocalizedString("Add", comment: ""), height: 20.0, fontSize: 11.0)
+        var constant: CGFloat = 0
+        if removeButtonConstant > addButtonConstant {
+            constant = removeButtonConstant + 30
+        } else {
+            constant = addButtonConstant + 30
+        }
+        removeButtonLayoutConstraint.constant = constant
+        addButtonLayoutConstraint.constant = constant
+
+        showCollectionView.enclosingScrollView?.scrollerStyle = .legacy
+        hideCollectionView.enclosingScrollView?.scrollerStyle = .legacy
+
+        let shadow = NSShadow()
+        shadow.shadowColor = KMAppearance.Status.hovColor()
+        shadow.shadowOffset = NSMakeSize(0, 1)
+        showCollectionBox.wantsLayer = true
+        showCollectionBox.shadow = shadow
+        hideCollectionBox.wantsLayer = true
+        hideCollectionBox.shadow = shadow
+
+        showCollectionView.register(KMHomeQuickToolsWindowCollectionViewItem.self, forItemWithIdentifier: NSUserInterfaceItemIdentifier("KMHomeQuickToolsWindowCollectionViewItem"))
+        hideCollectionView.register(KMHomeQuickToolsWindowCollectionViewItem.self, forItemWithIdentifier: NSUserInterfaceItemIdentifier("KMHomeQuickToolsWindowCollectionViewItem"))
+
+        showCollectionView.delegate = self
+        showCollectionView.dataSource = self
+        hideCollectionView.delegate = self
+        hideCollectionView.dataSource = self
+
+        showCollectionView.layer?.cornerRadius = 3.0
+        hideCollectionView.layer?.cornerRadius = 3.0
+
+        registerForCollectionViewDragAndDrop()
+        
+//        self.showCollectionView.reloadData()
+//        self.hideCollectionView.reloadData()
+    }
+    
+    func showData(showArr: [NSNumber], hideArr: [NSNumber]) {
+        collectionItemWidth = self.itemReturnedWidthValue(withShowArray: showArr, hideArray: hideArr, fontSize: 12, height: collectionItemHeight) + 40
+        showArray = showArr
+        hideArray = hideArr
+    }
+
+    func registerForCollectionViewDragAndDrop() {
+        showCollectionView.registerForDraggedTypes([NSPasteboard.PasteboardType.string])
+        showCollectionView.setDraggingSourceOperationMask(.every, forLocal: false)
+        showCollectionView.setDraggingSourceOperationMask(.every, forLocal: true)
+
+        hideCollectionView.registerForDraggedTypes([NSPasteboard.PasteboardType.string])
+        hideCollectionView.setDraggingSourceOperationMask(.every, forLocal: false)
+        hideCollectionView.setDraggingSourceOperationMask(.every, forLocal: true)
+    }
+
+    func moveCell(fromIndex: Int, toIndex: Int, collectionView: NSCollectionView) {
+        if collectionView == showCollectionView {
+            let fromNumber = showArray[fromIndex]
+            var currentIndex = fromIndex
+            if fromIndex <= toIndex {
+                for _ in fromIndex..<toIndex {
+                    currentIndex = showArray.firstIndex(of: fromNumber) ?? fromIndex
+                    if currentIndex < toIndex {
+                        showArray.swapAt(currentIndex, currentIndex + 1)
+                        currentIndex += 1
+                    }
+                }
+            } else {
+                for _ in toIndex..<fromIndex {
+                    currentIndex = showArray.firstIndex(of: fromNumber) ?? fromIndex
+                    if currentIndex > toIndex {
+                        showArray.swapAt(currentIndex, currentIndex - 1)
+                        currentIndex -= 1
+                    }
+                }
+            }
+        } else if collectionView == hideCollectionView {
+            let fromNumber = hideArray[fromIndex]
+            var currentIndex = fromIndex
+            if fromIndex <= toIndex {
+                for _ in fromIndex..<toIndex {
+                    currentIndex = hideArray.firstIndex(of: fromNumber) ?? fromIndex
+                    if currentIndex < toIndex {
+                        hideArray.swapAt(currentIndex, currentIndex + 1)
+                        currentIndex += 1
+                    }
+                }
+            } else {
+                for _ in toIndex..<fromIndex {
+                    currentIndex = hideArray.firstIndex(of: fromNumber) ?? fromIndex
+                    if currentIndex > toIndex {
+                        hideArray.swapAt(currentIndex, currentIndex - 1)
+                        currentIndex -= 1
+                    }
+                }
+            }
+        }
+    }
+
+    func labelReturnedValue(withString value: String, height: CGFloat, fontSize: CGFloat) -> CGFloat {
+        if let value = value as NSString? {
+            let rect = value.boundingRect(with: CGSize(width: .greatestFiniteMagnitude, height: height), options: .usesLineFragmentOrigin, attributes: [NSAttributedString.Key.font: NSFont.systemFont(ofSize: fontSize)], context: nil)
+            return rect.size.width
+        }
+        return 0
+    }
+}
+
+extension KMHomeQuickToolsCollectionView {
+    @IBAction func removeButtonAction(_ sender: Any) {
+        for indexPath in selectShowItemMutableArray {
+            let itemCount = indexPath.item
+            hideArray.append(showArray[itemCount])
+            showArray.remove(at: itemCount)
+        }
+
+        removeBox.borderColor = NSColor.gridColor
+        removeButton.isEnabled = false
+        addBox.borderColor = NSColor.gridColor
+        addButton.isEnabled = false
+        hideCollectionView.reloadData()
+        showCollectionView.reloadData()
+        
+        guard let callBack = dataChange else { return }
+        callBack(self, showArray)
+    }
+    
+    @IBAction func addButtonAction(_ sender: Any) {
+        for indexPath in selectHideItemMutableArray {
+            let itemCount = indexPath.item
+            showArray.append(hideArray[itemCount])
+            hideArray.remove(at: itemCount)
+        }
+
+        removeBox.borderColor = NSColor.gridColor
+        addButton.isEnabled = false
+        addBox.borderColor = NSColor.gridColor
+        removeButton.isEnabled = false
+        showCollectionView.reloadData()
+        hideCollectionView.reloadData()
+        
+        guard let callBack = dataChange else { return }
+        callBack(self, showArray)
+
+    }
+}
+
+extension KMHomeQuickToolsCollectionView: NSCollectionViewDelegate, NSCollectionViewDataSource, NSCollectionViewDelegateFlowLayout {
+    func collectionView(_ collectionView: NSCollectionView, itemForRepresentedObjectAt indexPath: IndexPath) -> NSCollectionViewItem {
+        let item = collectionView.makeItem(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "KMHomeQuickToolsWindowCollectionViewItem"), for: indexPath) as! KMHomeQuickToolsWindowCollectionViewItem
+        
+        if collectionView.isEqual(showCollectionView) {
+            item.model = KMQucikToolsModel(type: DataNavigationViewButtonActionType(rawValue: Int(truncating: showArray[indexPath.item])))
+        } else if collectionView.isEqual(hideCollectionView) {
+            item.model = KMQucikToolsModel(type: DataNavigationViewButtonActionType(rawValue: Int(truncating: hideArray[indexPath.item])))
+        }
+        
+        return item
+    }
+    
+    func collectionView(_ collectionView: NSCollectionView, numberOfItemsInSection section: Int) -> Int {
+        if collectionView.isEqual(showCollectionView) {
+            return showArray.count
+        } else if collectionView.isEqual(hideCollectionView) {
+            return hideArray.count
+        }
+        return 0
+    }
+    
+    func collectionView(_ collectionView: NSCollectionView, didSelectItemsAt indexPaths: Set<IndexPath>) {
+        let indexPathArr = Array(indexPaths)
+        
+        if collectionView.isEqual(showCollectionView) {
+            self.selectShowItemMutableArray.removeAll()
+            
+            removeBox.borderColor = KMAppearance.Layout.h2Color()
+            removeButton.isEnabled = true
+            
+            for indexPath in indexPathArr {
+                self.selectShowItemMutableArray.append(indexPath)
+            }
+        } else if collectionView.isEqual(hideCollectionView) {
+            self.selectHideItemMutableArray.removeAll()
+            
+            addBox.borderColor = KMAppearance.Layout.h2Color()
+            addButton.isEnabled = true
+            
+            for indexPath in indexPathArr {
+                self.selectHideItemMutableArray.append(indexPath)
+            }
+        }
+    }
+    
+    func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> NSSize {
+        return NSSize(width: collectionItemWidth, height: collectionItemHeight)
+    }
+    
+    // NSCollectionViewDelegate Drag-and-Drop Methods
+    
+    func collectionView(_ collectionView: NSCollectionView, canDragItemsAt indexPaths: Set<IndexPath>, with event: NSEvent) -> Bool {
+        return true
+    }
+    
+    func collectionView(_ collectionView: NSCollectionView, pasteboardWriterForItemAt indexPath: IndexPath) -> NSPasteboardWriting? {
+        return String(indexPath.item) as NSPasteboardWriting
+    }
+    
+    func collectionView(_ collectionView: NSCollectionView, draggingSession session: NSDraggingSession, willBeginAt screenPoint: NSPoint, forItemsAt indexPaths: Set<IndexPath>) {
+        if collectionView.isEqual(showCollectionView) {
+            indexPathsOfItemsBeingShowItemDragged = indexPaths
+        } else if collectionView.isEqual(hideCollectionView) {
+            indexPathsOfItemsBeingHideItemDragged = indexPaths
+        }
+    }
+    
+    func collectionView(_ collectionView: NSCollectionView, validateDrop draggingInfo: NSDraggingInfo, proposedIndexPath proposedDropIndexPath: AutoreleasingUnsafeMutablePointer<NSIndexPath>, dropOperation proposedDropOperation: UnsafeMutablePointer<NSCollectionView.DropOperation>) -> NSDragOperation {
+        if collectionView.isEqual(showCollectionView) {
+            if indexPathsOfItemsBeingShowItemDragged.count != 0 {
+                return .move
+            } else {
+                return .copy
+            }
+        } else if collectionView.isEqual(hideCollectionView) {
+            if indexPathsOfItemsBeingHideItemDragged.count != 0 {
+                return .move
+            } else {
+                return .copy
+            }
+        }
+        return []
+    }
+    
+    func collectionView(_ collectionView: NSCollectionView, acceptDrop draggingInfo: NSDraggingInfo, indexPath: IndexPath, dropOperation: NSCollectionView.DropOperation) -> Bool {
+        var result = false
+        if collectionView.isEqual(showCollectionView) {
+            if indexPathsOfItemsBeingShowItemDragged.count != 0 {
+                var toItemIndex = indexPath.item
+                for fromIndexPath in indexPathsOfItemsBeingShowItemDragged {
+                    let fromItemIndex = fromIndexPath.item
+                    if fromItemIndex > toItemIndex {
+                        moveCell(fromIndex: fromItemIndex, toIndex: toItemIndex, collectionView: collectionView)
+                        collectionView.animator().moveItem(at: fromIndexPath, to: IndexPath(item: toItemIndex, section: indexPath.section))
+                        toItemIndex += 1
+                    }
+                }
+                var adjustedToItemIndex = indexPath.item
+                for fromIndexPath in indexPathsOfItemsBeingShowItemDragged.reversed() {
+                    let fromItemIndex = fromIndexPath.item
+                    if fromItemIndex < adjustedToItemIndex {
+                        if adjustedToItemIndex >= showArray.count {
+                            adjustedToItemIndex = showArray.count - 1
+                        }
+                        moveCell(fromIndex: fromItemIndex, toIndex: adjustedToItemIndex, collectionView: collectionView)
+                        let adjustedToIndexPath = IndexPath(item: adjustedToItemIndex, section: indexPath.section)
+                        collectionView.animator().moveItem(at: fromIndexPath, to: adjustedToIndexPath)
+                        adjustedToItemIndex -= 1
+                    }
+                }
+                result = true
+            } else if indexPathsOfItemsBeingHideItemDragged.count != 0 {
+                let toItemIndex = indexPathsOfItemsBeingHideItemDragged.first!.item
+                showArray.insert((hideArray[toItemIndex] as! Int) as NSNumber, at: indexPath.item)
+                hideArray.remove(at: toItemIndex)
+                result = true
+                
+                self.dataChange?(self, showArray)
+            }
+        } else if collectionView.isEqual(hideCollectionView) {
+            if indexPathsOfItemsBeingHideItemDragged.count != 0 {
+                var toItemIndex = indexPath.item
+                for fromIndexPath in indexPathsOfItemsBeingHideItemDragged {
+                    let fromItemIndex = fromIndexPath.item
+                    if fromItemIndex > toItemIndex {
+                        moveCell(fromIndex: fromItemIndex, toIndex: toItemIndex, collectionView: collectionView)
+                        collectionView.animator().moveItem(at: fromIndexPath, to: IndexPath(item: toItemIndex, section: indexPath.section))
+                        toItemIndex += 1
+                    }
+                }
+                var adjustedToItemIndex = indexPath.item - 1
+                for fromIndexPath in indexPathsOfItemsBeingHideItemDragged.reversed() {
+                    let fromItemIndex = fromIndexPath.item
+                    if fromItemIndex < adjustedToItemIndex {
+                        if adjustedToItemIndex >= showArray.count {
+                            adjustedToItemIndex = showArray.count - 1
+                        }
+                        moveCell(fromIndex: fromItemIndex, toIndex: adjustedToItemIndex, collectionView: collectionView)
+                        let adjustedToIndexPath = IndexPath(item: adjustedToItemIndex, section: indexPath.section)
+                        collectionView.animator().moveItem(at: fromIndexPath, to: adjustedToIndexPath)
+                        adjustedToItemIndex -= 1
+                    }
+                }
+                result = true
+            } else if indexPathsOfItemsBeingShowItemDragged.count != 0 {
+                let toItemIndex = indexPathsOfItemsBeingShowItemDragged.first!.item
+                hideArray.insert((showArray[toItemIndex] as! Int) as NSNumber, at: indexPath.item)
+                showArray.remove(at: toItemIndex)
+                result = true
+                
+                self.dataChange?(self, showArray)
+            }
+        }
+        return result
+    }
+    
+    func collectionView(_ collectionView: NSCollectionView, draggingSession session: NSDraggingSession, endedAt screenPoint: NSPoint, dragOperation operation: NSDragOperation) {
+        if collectionView.isEqual(showCollectionView) {
+            indexPathsOfItemsBeingShowItemDragged.removeAll()
+            removeBox.borderColor = KMAppearance.Layout.h2Color()
+            removeButton.isEnabled = false
+        } else if collectionView.isEqual(hideCollectionView) {
+            indexPathsOfItemsBeingHideItemDragged.removeAll()
+            addBox.borderColor = KMAppearance.Layout.h2Color()
+            addButton.isEnabled = false
+        }
+        showCollectionView.reloadSections(IndexSet(integer: 0))
+        hideCollectionView.reloadSections(IndexSet(integer: 0))
+    }
+}
+
+extension KMHomeQuickToolsCollectionView {
+    func itemReturnedWidthValue(withShowArray showArr: [Any], hideArray hideArr: [Any], fontSize: CGFloat, height: CGFloat) -> CGFloat {
+       var itemWidth: CGFloat = 0.0
+       
+       if showArr.count != 0 {
+           for number in showArr {
+               let value = KMQucikToolsModel(type: DataNavigationViewButtonActionType(rawValue: Int(truncating: number as! NSNumber))).titleString()
+               let rect = value.boundingRect(with: CGSize(width: CGFloat.greatestFiniteMagnitude, height: height), options: .usesLineFragmentOrigin, attributes: [NSAttributedString.Key.font: NSFont.systemFont(ofSize: fontSize)], context: nil)
+               if itemWidth < rect.size.width {
+                   itemWidth = rect.size.width
+               }
+           }
+       }
+       
+        if hideArr.count != 0 {
+           for number in hideArr {
+               let value = KMQucikToolsModel(type: DataNavigationViewButtonActionType(rawValue: Int(truncating: number as! NSNumber))).titleString()
+               let rect = value.boundingRect(with: CGSize(width: CGFloat.greatestFiniteMagnitude, height: height), options: .usesLineFragmentOrigin, attributes: [NSAttributedString.Key.font: NSFont.systemFont(ofSize: fontSize)], context: nil)
+               if itemWidth < rect.size.width {
+                   itemWidth = rect.size.width
+               }
+           }
+       }
+       
+       return itemWidth
+   }
+
+}

+ 301 - 0
PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/View/KMHomeQuickToolsCollectionView.xib

@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
+        <capability name="Named colors" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMHomeQuickToolsCollectionView" customModule="PDF_Master" customModuleProvider="target">
+            <connections>
+                <outlet property="addBox" destination="KYp-Pm-ymt" id="8Yz-gx-Su2"/>
+                <outlet property="addButton" destination="xs3-04-UNg" id="3eO-XG-Xlv"/>
+                <outlet property="addButtonLayoutConstraint" destination="hZi-du-dDD" id="2AM-5t-JKh"/>
+                <outlet property="hideBox" destination="juo-Ft-YOc" id="LQM-bP-yqL"/>
+                <outlet property="hideCollectionBox" destination="had-dS-O5V" id="dV1-yI-vbF"/>
+                <outlet property="hideCollectionView" destination="Bn0-jT-VhN" id="mnz-BN-O0w"/>
+                <outlet property="hideLabel" destination="h3C-nl-g1s" id="jcE-7w-U6K"/>
+                <outlet property="hideScrollView" destination="bM7-tQ-r2n" id="3Qb-2l-wTG"/>
+                <outlet property="promptLabel" destination="Ydr-bv-wt0" id="ha7-n9-NXT"/>
+                <outlet property="removeBox" destination="eO9-K6-xTh" id="RWI-PI-EF4"/>
+                <outlet property="removeButton" destination="KWV-Va-jBL" id="dRj-nP-G4X"/>
+                <outlet property="removeButtonLayoutConstraint" destination="GTY-ZM-EhO" id="b5j-Ub-nWy"/>
+                <outlet property="showBox" destination="JaM-hp-8ew" id="V3m-ni-eMt"/>
+                <outlet property="showCollectionBox" destination="Il2-Uc-CMi" id="SnW-Rx-1u7"/>
+                <outlet property="showCollectionView" destination="NTC-Mz-13p" id="JaW-b0-zTy"/>
+                <outlet property="showLabel" destination="oZJ-2u-a48" id="RSl-Ih-j7n"/>
+                <outlet property="showScrollView" destination="p4q-Sn-3Ru" id="qr8-7p-egD"/>
+            </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="599" height="389"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <view translatesAutoresizingMaskIntoConstraints="NO" id="3Fh-S9-PT7">
+                    <rect key="frame" x="0.0" y="0.0" width="599" height="389"/>
+                    <subviews>
+                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="JaM-hp-8ew">
+                            <rect key="frame" x="24" y="223" width="551" height="152"/>
+                            <view key="contentView" id="llW-kb-GME">
+                                <rect key="frame" x="0.0" y="0.0" width="551" height="152"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                <subviews>
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oZJ-2u-a48">
+                                        <rect key="frame" x="-2" y="129" width="37" height="17"/>
+                                        <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="FWK-FL-yyw">
+                                            <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>
+                                    <box boxType="custom" cornerRadius="1" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="eO9-K6-xTh">
+                                        <rect key="frame" x="503" y="132" width="48" height="20"/>
+                                        <view key="contentView" id="dHa-Un-zbM">
+                                            <rect key="frame" x="1" y="1" width="46" height="18"/>
+                                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                            <subviews>
+                                                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KWV-Va-jBL">
+                                                    <rect key="frame" x="4" y="2" width="38" height="14"/>
+                                                    <buttonCell key="cell" type="square" title="Button" bezelStyle="shadowlessSquare" image="KMImageNameToolbarMinus" imagePosition="left" alignment="center" imageScaling="proportionallyDown" inset="2" id="Lym-za-6qG">
+                                                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                        <font key="font" metaFont="smallSystem"/>
+                                                    </buttonCell>
+                                                    <color key="contentTintColor" name="KMGray6Color"/>
+                                                    <connections>
+                                                        <action selector="removeButtonAction:" target="-2" id="obE-gw-d2b"/>
+                                                    </connections>
+                                                </button>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="KWV-Va-jBL" firstAttribute="leading" secondItem="dHa-Un-zbM" secondAttribute="leading" constant="4" id="6Hb-Lf-Den"/>
+                                                <constraint firstAttribute="bottom" secondItem="KWV-Va-jBL" secondAttribute="bottom" constant="2" id="8rL-tO-Btf"/>
+                                                <constraint firstAttribute="trailing" secondItem="KWV-Va-jBL" secondAttribute="trailing" constant="4" id="B6N-8F-twD"/>
+                                                <constraint firstItem="KWV-Va-jBL" firstAttribute="top" secondItem="dHa-Un-zbM" secondAttribute="top" constant="2" id="VRD-uH-KEb"/>
+                                            </constraints>
+                                        </view>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="48" id="GTY-ZM-EhO"/>
+                                            <constraint firstAttribute="height" constant="20" id="tOM-5W-o1d"/>
+                                        </constraints>
+                                        <color key="borderColor" red="0.14117647059999999" green="0.1647058824" blue="0.20000000000000001" alpha="0.40000000000000002" colorSpace="custom" customColorSpace="calibratedRGB"/>
+                                    </box>
+                                    <box title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="Il2-Uc-CMi">
+                                        <rect key="frame" x="-3" y="1" width="557" height="130"/>
+                                        <view key="contentView" id="vHY-DU-qoM">
+                                            <rect key="frame" x="4" y="5" width="549" height="122"/>
+                                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                            <subviews>
+                                                <scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p4q-Sn-3Ru">
+                                                    <rect key="frame" x="0.0" y="0.0" width="549" height="122"/>
+                                                    <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="Gny-pG-RYZ">
+                                                        <rect key="frame" x="0.0" y="0.0" width="549" height="107"/>
+                                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                        <subviews>
+                                                            <collectionView selectable="YES" id="NTC-Mz-13p">
+                                                                <rect key="frame" x="0.0" y="0.0" width="550" height="107"/>
+                                                                <autoresizingMask key="autoresizingMask" heightSizable="YES"/>
+                                                                <collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" scrollDirection="horizontal" id="veu-Gt-wzR">
+                                                                    <size key="itemSize" width="50" height="32"/>
+                                                                    <edgeInsets key="sectionInset" left="11" right="11" top="11" bottom="11"/>
+                                                                </collectionViewFlowLayout>
+                                                                <color key="primaryBackgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
+                                                            </collectionView>
+                                                        </subviews>
+                                                    </clipView>
+                                                    <scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="1NS-HY-iL0" customClass="KMToolSetScroller" customModule="PDF_Master" customModuleProvider="target">
+                                                        <rect key="frame" x="0.0" y="107" width="549" height="15"/>
+                                                        <autoresizingMask key="autoresizingMask"/>
+                                                    </scroller>
+                                                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="Zs2-vu-yZI">
+                                                        <rect key="frame" x="-100" y="-100" width="15" height="110"/>
+                                                        <autoresizingMask key="autoresizingMask"/>
+                                                    </scroller>
+                                                </scrollView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="p4q-Sn-3Ru" firstAttribute="top" secondItem="vHY-DU-qoM" secondAttribute="top" id="IVl-i7-7YU"/>
+                                                <constraint firstAttribute="bottom" secondItem="p4q-Sn-3Ru" secondAttribute="bottom" id="Jxt-TW-nhd"/>
+                                                <constraint firstItem="p4q-Sn-3Ru" firstAttribute="leading" secondItem="vHY-DU-qoM" secondAttribute="leading" id="ZDR-ap-67a"/>
+                                                <constraint firstAttribute="trailing" secondItem="p4q-Sn-3Ru" secondAttribute="trailing" id="hd8-eK-lPZ"/>
+                                            </constraints>
+                                        </view>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="124" id="INB-ud-3sF"/>
+                                        </constraints>
+                                    </box>
+                                </subviews>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="Il2-Uc-CMi" secondAttribute="trailing" id="7M3-9a-DdS"/>
+                                    <constraint firstItem="oZJ-2u-a48" firstAttribute="top" secondItem="llW-kb-GME" secondAttribute="top" constant="6" id="8k0-jU-tqA"/>
+                                    <constraint firstItem="oZJ-2u-a48" firstAttribute="leading" secondItem="llW-kb-GME" secondAttribute="leading" id="KN7-0E-weC"/>
+                                    <constraint firstItem="eO9-K6-xTh" firstAttribute="top" secondItem="llW-kb-GME" secondAttribute="top" id="LMT-up-4dW"/>
+                                    <constraint firstAttribute="trailing" secondItem="eO9-K6-xTh" secondAttribute="trailing" id="OFB-bC-bh1"/>
+                                    <constraint firstItem="Il2-Uc-CMi" firstAttribute="leading" secondItem="llW-kb-GME" secondAttribute="leading" id="iN0-iV-6rf"/>
+                                    <constraint firstItem="Il2-Uc-CMi" firstAttribute="top" secondItem="oZJ-2u-a48" secondAttribute="bottom" id="j2U-ab-GNw"/>
+                                    <constraint firstAttribute="bottom" secondItem="Il2-Uc-CMi" secondAttribute="bottom" constant="5" id="pZB-VC-nk3"/>
+                                </constraints>
+                            </view>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="152" id="lle-eg-g65"/>
+                            </constraints>
+                        </box>
+                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="juo-Ft-YOc">
+                            <rect key="frame" x="24" y="94" width="551" height="105"/>
+                            <view key="contentView" id="DfN-Ur-hrR">
+                                <rect key="frame" x="0.0" y="0.0" width="551" height="105"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                <subviews>
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="h3C-nl-g1s">
+                                        <rect key="frame" x="-2" y="83" width="37" height="16"/>
+                                        <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Dib-hV-L3j">
+                                            <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>
+                                    <box boxType="custom" cornerRadius="1" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="KYp-Pm-ymt">
+                                        <rect key="frame" x="503" y="85" width="48" height="20"/>
+                                        <view key="contentView" id="Hwe-10-zSW">
+                                            <rect key="frame" x="1" y="1" width="46" height="18"/>
+                                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                            <subviews>
+                                                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xs3-04-UNg">
+                                                    <rect key="frame" x="4" y="2" width="38" height="14"/>
+                                                    <buttonCell key="cell" type="square" title="Button" bezelStyle="shadowlessSquare" image="KMImageNameToolbarPlus" imagePosition="left" alignment="center" imageScaling="proportionallyDown" inset="2" id="WLS-gc-TkH">
+                                                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                        <font key="font" metaFont="smallSystem"/>
+                                                    </buttonCell>
+                                                    <color key="contentTintColor" name="KMGray6Color"/>
+                                                    <connections>
+                                                        <action selector="addButtonAction:" target="-2" id="kIG-x0-JjT"/>
+                                                    </connections>
+                                                </button>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="xs3-04-UNg" firstAttribute="leading" secondItem="Hwe-10-zSW" secondAttribute="leading" constant="4" id="IwS-rZ-HNG"/>
+                                                <constraint firstAttribute="bottom" secondItem="xs3-04-UNg" secondAttribute="bottom" constant="2" id="OtB-Cb-cGk"/>
+                                                <constraint firstAttribute="trailing" secondItem="xs3-04-UNg" secondAttribute="trailing" constant="4" id="lMF-aN-x9e"/>
+                                                <constraint firstItem="xs3-04-UNg" firstAttribute="top" secondItem="Hwe-10-zSW" secondAttribute="top" constant="2" id="spE-Ng-PB5"/>
+                                            </constraints>
+                                        </view>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="20" id="TfY-2M-8Dj"/>
+                                            <constraint firstAttribute="width" constant="48" id="hZi-du-dDD"/>
+                                        </constraints>
+                                        <color key="borderColor" red="0.14117647059999999" green="0.1647058824" blue="0.20000000000000001" alpha="0.40000000000000002" colorSpace="custom" customColorSpace="calibratedRGB"/>
+                                    </box>
+                                    <box title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="had-dS-O5V">
+                                        <rect key="frame" x="-3" y="1" width="557" height="82"/>
+                                        <view key="contentView" id="Hg9-zh-qii">
+                                            <rect key="frame" x="4" y="5" width="549" height="74"/>
+                                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                            <subviews>
+                                                <scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bM7-tQ-r2n">
+                                                    <rect key="frame" x="0.0" y="0.0" width="549" height="74"/>
+                                                    <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="aFj-Jy-bIY">
+                                                        <rect key="frame" x="0.0" y="0.0" width="549" height="59"/>
+                                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                        <subviews>
+                                                            <collectionView selectable="YES" id="Bn0-jT-VhN">
+                                                                <rect key="frame" x="0.0" y="0.0" width="550" height="59"/>
+                                                                <autoresizingMask key="autoresizingMask" heightSizable="YES"/>
+                                                                <collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" scrollDirection="horizontal" id="o7v-Gi-hLL">
+                                                                    <size key="itemSize" width="50" height="50"/>
+                                                                    <edgeInsets key="sectionInset" left="11" right="11" top="11" bottom="11"/>
+                                                                </collectionViewFlowLayout>
+                                                                <color key="primaryBackgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
+                                                            </collectionView>
+                                                        </subviews>
+                                                    </clipView>
+                                                    <scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="x6F-KV-VRU" customClass="KMToolSetScroller" customModule="PDF_Master" customModuleProvider="target">
+                                                        <rect key="frame" x="0.0" y="59" width="549" height="15"/>
+                                                        <autoresizingMask key="autoresizingMask"/>
+                                                    </scroller>
+                                                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="s2H-c0-laI">
+                                                        <rect key="frame" x="-100" y="-100" width="15" height="62"/>
+                                                        <autoresizingMask key="autoresizingMask"/>
+                                                    </scroller>
+                                                </scrollView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstAttribute="bottom" secondItem="bM7-tQ-r2n" secondAttribute="bottom" id="CTt-I0-xeW"/>
+                                                <constraint firstItem="bM7-tQ-r2n" firstAttribute="top" secondItem="Hg9-zh-qii" secondAttribute="top" id="Me2-SI-EUd"/>
+                                                <constraint firstItem="bM7-tQ-r2n" firstAttribute="leading" secondItem="Hg9-zh-qii" secondAttribute="leading" id="X1i-xm-Xc9"/>
+                                                <constraint firstAttribute="trailing" secondItem="bM7-tQ-r2n" secondAttribute="trailing" id="n6W-ev-wGc"/>
+                                            </constraints>
+                                        </view>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="76" id="Hjf-dc-NRD"/>
+                                        </constraints>
+                                    </box>
+                                </subviews>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="KYp-Pm-ymt" secondAttribute="trailing" id="DZV-cV-jw1"/>
+                                    <constraint firstItem="KYp-Pm-ymt" firstAttribute="top" secondItem="DfN-Ur-hrR" secondAttribute="top" id="UHA-oI-14y"/>
+                                    <constraint firstItem="h3C-nl-g1s" firstAttribute="leading" secondItem="DfN-Ur-hrR" secondAttribute="leading" id="ZwF-0d-YPC"/>
+                                    <constraint firstAttribute="trailing" secondItem="had-dS-O5V" secondAttribute="trailing" id="c04-hg-iMi"/>
+                                    <constraint firstItem="had-dS-O5V" firstAttribute="top" secondItem="h3C-nl-g1s" secondAttribute="bottom" constant="2" id="dsi-rB-vlz"/>
+                                    <constraint firstItem="had-dS-O5V" firstAttribute="leading" secondItem="DfN-Ur-hrR" secondAttribute="leading" id="ggn-WQ-ivd"/>
+                                    <constraint firstItem="h3C-nl-g1s" firstAttribute="top" secondItem="DfN-Ur-hrR" secondAttribute="top" constant="6" id="tBb-nS-WW2"/>
+                                    <constraint firstAttribute="bottom" secondItem="had-dS-O5V" secondAttribute="bottom" constant="5" id="y0C-GC-5Aa"/>
+                                </constraints>
+                            </view>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="105" id="8O5-Z9-guE"/>
+                            </constraints>
+                        </box>
+                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="6J3-MG-5rt">
+                            <rect key="frame" x="24" y="29" width="20" height="31"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="20" id="36A-ZL-yZ6"/>
+                                <constraint firstAttribute="width" constant="20" id="gj1-el-v6y"/>
+                            </constraints>
+                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSTouchBarGetInfoTemplate" id="8ut-Rb-hc0"/>
+                        </imageView>
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ydr-bv-wt0">
+                            <rect key="frame" x="42" y="36" width="37" height="16"/>
+                            <textFieldCell key="cell" title="Label" id="Z7N-Gq-h8w">
+                                <font key="font" metaFont="system"/>
+                                <color key="textColor" name="KMGrayColor"/>
+                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                            </textFieldCell>
+                        </textField>
+                    </subviews>
+                    <constraints>
+                        <constraint firstItem="Ydr-bv-wt0" firstAttribute="centerY" secondItem="6J3-MG-5rt" secondAttribute="centerY" id="4tR-P9-bG8"/>
+                        <constraint firstItem="juo-Ft-YOc" firstAttribute="top" secondItem="JaM-hp-8ew" secondAttribute="bottom" constant="24" id="5pM-8v-7WF"/>
+                        <constraint firstItem="Ydr-bv-wt0" firstAttribute="leading" secondItem="6J3-MG-5rt" secondAttribute="trailing" id="ILE-bA-XtM"/>
+                        <constraint firstAttribute="trailing" secondItem="JaM-hp-8ew" secondAttribute="trailing" constant="24" id="JDO-qA-UjA"/>
+                        <constraint firstItem="6J3-MG-5rt" firstAttribute="top" secondItem="juo-Ft-YOc" secondAttribute="bottom" constant="40" id="NlQ-95-vvV"/>
+                        <constraint firstItem="juo-Ft-YOc" firstAttribute="leading" secondItem="3Fh-S9-PT7" secondAttribute="leading" constant="24" id="atb-YH-bzC"/>
+                        <constraint firstItem="6J3-MG-5rt" firstAttribute="leading" secondItem="juo-Ft-YOc" secondAttribute="leading" id="foS-66-teY"/>
+                        <constraint firstItem="JaM-hp-8ew" firstAttribute="top" secondItem="3Fh-S9-PT7" secondAttribute="top" constant="14" id="k7u-YG-NrQ"/>
+                        <constraint firstAttribute="trailing" secondItem="juo-Ft-YOc" secondAttribute="trailing" constant="24" id="trc-QJ-Xdy"/>
+                        <constraint firstItem="JaM-hp-8ew" firstAttribute="leading" secondItem="3Fh-S9-PT7" secondAttribute="leading" constant="24" id="ukm-uE-hGn"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <constraints>
+                <constraint firstItem="3Fh-S9-PT7" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="8xd-Z7-n1E"/>
+                <constraint firstAttribute="bottom" secondItem="3Fh-S9-PT7" secondAttribute="bottom" id="KS6-it-vKZ"/>
+                <constraint firstAttribute="trailing" secondItem="3Fh-S9-PT7" secondAttribute="trailing" id="YKF-Os-EKG"/>
+                <constraint firstItem="3Fh-S9-PT7" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="i10-hM-XSl"/>
+            </constraints>
+            <point key="canvasLocation" x="90.5" y="200.5"/>
+        </customView>
+    </objects>
+    <resources>
+        <image name="KMImageNameToolbarMinus" width="20" height="20"/>
+        <image name="KMImageNameToolbarPlus" width="20" height="20"/>
+        <image name="NSTouchBarGetInfoTemplate" width="20" height="20"/>
+        <namedColor name="KMGray6Color">
+            <color red="0.396078431372549" green="0.41176470588235292" blue="0.4392156862745098" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+        </namedColor>
+        <namedColor name="KMGrayColor">
+            <color red="0.32899999618530273" green="0.32400000095367432" blue="0.4779999852180481" alpha="0.33000001311302185" colorSpace="custom" customColorSpace="sRGB"/>
+        </namedColor>
+    </resources>
+</document>

+ 49 - 0
PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/View/KMHomeQuickToolsWindowCollectionViewItem.swift

@@ -0,0 +1,49 @@
+//
+//  KMHomeQuickToolsWindowCollectionViewItem.swift
+//  PDF Master
+//
+//  Created by lizhe on 2023/10/31.
+//
+
+import Cocoa
+
+class KMHomeQuickToolsWindowCollectionViewItem: NSCollectionViewItem {
+    @IBOutlet weak var iconImageView: NSImageView!
+    @IBOutlet weak var titleLabel: NSTextField!
+    @IBOutlet weak var box: KMBox!
+    
+    var model: KMQucikToolsModel? {
+        didSet {
+            self.reloadData()
+        }
+    }
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        // Do view setup here.
+        self.setup()
+    }
+    
+    func setup() {
+        self.box.fillColor = NSColor.clear
+        self.titleLabel.textColor = KMAppearance.Layout.h2Color()
+        
+        self.box.moveCallback = {  [unowned self]  mouseEntered, mouseBox in
+            if mouseEntered {
+                box.fillColor = KMAppearance.Interactive.a0Color()
+                titleLabel.textColor = KMAppearance.Layout.w0Color()
+                iconImageView.image = model?.iconImage(true)
+            } else {
+                box.fillColor = NSColor.clear
+                titleLabel.textColor = KMAppearance.Layout.h2Color()
+                iconImageView.image = model?.iconImage(false)
+            }
+        }
+    }
+    
+    func reloadData() {
+        guard let model = model else { return }
+        
+        titleLabel.stringValue = model.titleString()
+        iconImageView.image = model.iconImage()
+    }
+}

+ 72 - 0
PDF Office/PDF Master/Class/Home/WindowController/HomeQuickToolsWindowController/View/KMHomeQuickToolsWindowCollectionViewItem.xib

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
+        <capability name="Named colors" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMHomeQuickToolsWindowCollectionViewItem" customModule="PDF_Master" customModuleProvider="target">
+            <connections>
+                <outlet property="box" destination="Ttz-dr-sxl" id="oem-1C-5Vo"/>
+                <outlet property="iconImageView" destination="d1h-XT-2z8" id="lDg-fT-BDM"/>
+                <outlet property="titleLabel" destination="prt-hf-eww" id="WAt-ak-9Ws"/>
+                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="Hz6-mo-xeY">
+            <rect key="frame" x="0.0" y="0.0" width="218" height="83"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <box boxType="custom" borderWidth="0.0" cornerRadius="1" translatesAutoresizingMaskIntoConstraints="NO" id="Ttz-dr-sxl" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
+                    <rect key="frame" x="0.0" y="0.0" width="218" height="83"/>
+                    <view key="contentView" id="c3L-Pc-4Zt">
+                        <rect key="frame" x="0.0" y="0.0" width="218" height="83"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="d1h-XT-2z8">
+                                <rect key="frame" x="8" y="32" width="20" height="20"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="20" id="tGJ-8f-5BF"/>
+                                    <constraint firstAttribute="width" constant="20" id="yaH-BX-8Ff"/>
+                                </constraints>
+                                <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="KMImageNameHomeBackground" id="bMJ-f5-1c8"/>
+                            </imageView>
+                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="prt-hf-eww">
+                                <rect key="frame" x="30" y="34" width="35" height="15"/>
+                                <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="7l0-f9-2oB">
+                                    <font key="font" metaFont="cellTitle"/>
+                                    <color key="textColor" name="KMGray6Color"/>
+                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                </textFieldCell>
+                            </textField>
+                        </subviews>
+                        <constraints>
+                            <constraint firstItem="prt-hf-eww" firstAttribute="leading" secondItem="d1h-XT-2z8" secondAttribute="trailing" constant="4" id="3bP-mR-cLf"/>
+                            <constraint firstItem="d1h-XT-2z8" firstAttribute="leading" secondItem="c3L-Pc-4Zt" secondAttribute="leading" constant="8" id="GxI-WE-hZL"/>
+                            <constraint firstItem="prt-hf-eww" firstAttribute="centerY" secondItem="c3L-Pc-4Zt" secondAttribute="centerY" id="KQh-kK-xVR"/>
+                            <constraint firstItem="d1h-XT-2z8" firstAttribute="centerY" secondItem="c3L-Pc-4Zt" secondAttribute="centerY" id="agB-eV-RCp"/>
+                        </constraints>
+                    </view>
+                    <color key="fillColor" white="1" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                </box>
+            </subviews>
+            <constraints>
+                <constraint firstAttribute="bottom" secondItem="Ttz-dr-sxl" secondAttribute="bottom" id="6pM-nY-zFZ"/>
+                <constraint firstItem="Ttz-dr-sxl" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="LP6-8J-kde"/>
+                <constraint firstItem="Ttz-dr-sxl" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="ZRe-Ar-djJ"/>
+                <constraint firstAttribute="trailing" secondItem="Ttz-dr-sxl" secondAttribute="trailing" id="mc5-sO-XY3"/>
+            </constraints>
+            <point key="canvasLocation" x="262" y="219.5"/>
+        </customView>
+    </objects>
+    <resources>
+        <image name="KMImageNameHomeBackground" width="40" height="40"/>
+        <namedColor name="KMGray6Color">
+            <color red="0.396078431372549" green="0.41176470588235292" blue="0.4392156862745098" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+        </namedColor>
+    </resources>
+</document>

+ 1 - 4
PDF Office/PDF Master/Class/KMAdvertisement/View/View/KMAdvertisementShowView.xib

@@ -24,9 +24,6 @@
                     <subviews>
                         <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="obQ-2R-s8Q">
                             <rect key="frame" x="0.0" y="0.0" width="208" height="120"/>
-                            <constraints>
-                                <constraint firstAttribute="width" secondItem="obQ-2R-s8Q" secondAttribute="height" multiplier="208:120" id="VpK-gc-yT8"/>
-                            </constraints>
                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="DKy-5d-0cT"/>
                         </imageView>
                         <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FlW-6z-t7c">
@@ -57,8 +54,8 @@
                         <constraint firstItem="obQ-2R-s8Q" firstAttribute="top" secondItem="geo-Fe-wJO" secondAttribute="top" id="f86-yV-16W"/>
                         <constraint firstAttribute="trailing" secondItem="Iay-VK-ICj" secondAttribute="trailing" id="fkb-Kj-0hp"/>
                         <constraint firstAttribute="height" constant="120" id="kze-Mi-xh1"/>
+                        <constraint firstAttribute="width" constant="208" id="mJa-Ch-4S7"/>
                         <constraint firstItem="FlW-6z-t7c" firstAttribute="top" secondItem="geo-Fe-wJO" secondAttribute="top" id="oah-aB-v14"/>
-                        <constraint firstAttribute="width" constant="208" id="pzz-J5-rHf"/>
                         <constraint firstItem="obQ-2R-s8Q" firstAttribute="leading" secondItem="geo-Fe-wJO" secondAttribute="leading" id="z7j-Ok-plA"/>
                     </constraints>
                 </view>