Browse Source

【视图】单击页码显示器整体调整

lizhe 1 year ago
parent
commit
32f43c661e

+ 32 - 8
PDF Office/PDF Master.xcodeproj/project.pbxproj

@@ -1749,6 +1749,12 @@
 		ADE614BF298620C000F62ED7 /* ImageToPDF.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ADE614BE298620C000F62ED7 /* ImageToPDF.xcassets */; };
 		ADE614C0298620C000F62ED7 /* ImageToPDF.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ADE614BE298620C000F62ED7 /* ImageToPDF.xcassets */; };
 		ADE614C1298620C000F62ED7 /* ImageToPDF.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ADE614BE298620C000F62ED7 /* ImageToPDF.xcassets */; };
+		ADE8BC2529F7CCA600570F89 /* KMPageNumberDisplayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE8BC2429F7CCA600570F89 /* KMPageNumberDisplayView.swift */; };
+		ADE8BC2629F7CCA600570F89 /* KMPageNumberDisplayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE8BC2429F7CCA600570F89 /* KMPageNumberDisplayView.swift */; };
+		ADE8BC2729F7CCA600570F89 /* KMPageNumberDisplayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE8BC2429F7CCA600570F89 /* KMPageNumberDisplayView.swift */; };
+		ADE8BC2A29F7CDB000570F89 /* KMPageNumberDisplayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE8BC2929F7CDB000570F89 /* KMPageNumberDisplayView.xib */; };
+		ADE8BC2B29F7CDB000570F89 /* KMPageNumberDisplayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE8BC2929F7CDB000570F89 /* KMPageNumberDisplayView.xib */; };
+		ADE8BC2C29F7CDB000570F89 /* KMPageNumberDisplayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE8BC2929F7CDB000570F89 /* KMPageNumberDisplayView.xib */; };
 		ADEC7A7E299397F8009A8256 /* NSFont+SFProText.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADEC7A7B299397F8009A8256 /* NSFont+SFProText.swift */; };
 		ADEC7A7F299397F8009A8256 /* NSFont+SFProText.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADEC7A7B299397F8009A8256 /* NSFont+SFProText.swift */; };
 		ADEC7A80299397F8009A8256 /* NSFont+SFProText.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADEC7A7B299397F8009A8256 /* NSFont+SFProText.swift */; };
@@ -3899,6 +3905,8 @@
 		ADE614B429861CCC00F62ED7 /* KMBatchSelectedFilesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBatchSelectedFilesView.swift; sourceTree = "<group>"; };
 		ADE614B929861CFF00F62ED7 /* KMBatchSelectedFilesView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMBatchSelectedFilesView.xib; sourceTree = "<group>"; };
 		ADE614BE298620C000F62ED7 /* ImageToPDF.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ImageToPDF.xcassets; sourceTree = "<group>"; };
+		ADE8BC2429F7CCA600570F89 /* KMPageNumberDisplayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPageNumberDisplayView.swift; sourceTree = "<group>"; };
+		ADE8BC2929F7CDB000570F89 /* KMPageNumberDisplayView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMPageNumberDisplayView.xib; sourceTree = "<group>"; };
 		ADEC7A7B299397F8009A8256 /* NSFont+SFProText.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSFont+SFProText.swift"; sourceTree = "<group>"; };
 		ADEC7A7C299397F8009A8256 /* SF-Pro-Text-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-Pro-Text-Regular.otf"; sourceTree = "<group>"; };
 		ADEC7A7D299397F8009A8256 /* SF-Pro-Text-Semibold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-Pro-Text-Semibold.otf"; sourceTree = "<group>"; };
@@ -5524,6 +5532,7 @@
 		9FDD0F58294AB3E7000C4DAD /* ViewController */ = {
 			isa = PBXGroup;
 			children = (
+				ADE8BC2329F7CA5900570F89 /* Views */,
 				9FDD0F62294AB645000C4DAD /* KMMainViewController.swift */,
 				9FDD0F63294AB645000C4DAD /* KMMainViewController.xib */,
 				9FDD0F6A294AD12C000C4DAD /* KMMainViewController+UI.swift */,
@@ -6236,7 +6245,6 @@
 		ADBC375B29CC619200D93208 /* ReadModelView */ = {
 			isa = PBXGroup;
 			children = (
-				ADBC376929CD9DA400D93208 /* View */,
 				ADBC376429CD868300D93208 /* Source */,
 				ADBC375C29CC61E100D93208 /* KMReadModelView.swift */,
 				ADBC376029CC637900D93208 /* KMReadModelView.xib */,
@@ -6252,13 +6260,6 @@
 			path = Source;
 			sourceTree = "<group>";
 		};
-		ADBC376929CD9DA400D93208 /* View */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			path = View;
-			sourceTree = "<group>";
-		};
 		ADC075B42986693E006C752F /* Views */ = {
 			isa = PBXGroup;
 			children = (
@@ -6781,6 +6782,23 @@
 			path = Source;
 			sourceTree = "<group>";
 		};
+		ADE8BC2329F7CA5900570F89 /* Views */ = {
+			isa = PBXGroup;
+			children = (
+				ADE8BC2829F7CCAA00570F89 /* KMPageNumberDisplayView */,
+			);
+			path = Views;
+			sourceTree = "<group>";
+		};
+		ADE8BC2829F7CCAA00570F89 /* KMPageNumberDisplayView */ = {
+			isa = PBXGroup;
+			children = (
+				ADE8BC2429F7CCA600570F89 /* KMPageNumberDisplayView.swift */,
+				ADE8BC2929F7CDB000570F89 /* KMPageNumberDisplayView.xib */,
+			);
+			path = KMPageNumberDisplayView;
+			sourceTree = "<group>";
+		};
 		ADEC7A7A299397F8009A8256 /* Fonts */ = {
 			isa = PBXGroup;
 			children = (
@@ -8954,6 +8972,7 @@
 				BB7F7C0029AA586800A3E4E7 /* signAdd.png in Resources */,
 				9F0CB46A2967E5CB00007028 /* KMPropertiesPanelSubViewController.xib in Resources */,
 				9F0CB4722967E63100007028 /* KMPropertiesPanelNameSubVC.xib in Resources */,
+				ADE8BC2A29F7CDB000570F89 /* KMPageNumberDisplayView.xib in Resources */,
 				AD2D74B929F0D3A100EDC5E4 /* KMCancellationSuccessView.xib in Resources */,
 				BB3AAB9329878CE000992A5A /* KMWatermarkAdjectivePropertyMainController.xib in Resources */,
 				ADD272D429B9CFE20032B5D6 /* KMLightNoNetworkView.xib in Resources */,
@@ -9313,6 +9332,7 @@
 				BBD1F780296F9BE000343885 /* KMPageEditSettingBaseWindowController.xib in Resources */,
 				ADCB98D62924772200B51A03 /* KMBatchProcessingNameTableCell.xib in Resources */,
 				BBEC00BB295C2C1600A26C98 /* KMBatesPropertyHomeController.xib in Resources */,
+				ADE8BC2B29F7CDB000570F89 /* KMPageNumberDisplayView.xib in Resources */,
 				ADCB98E62924777A00B51A03 /* KMBatchProcessingSizeTableCell.xib in Resources */,
 				ADBC374D29CAD65D00D93208 /* KMComparativeOutlineCell.xib in Resources */,
 				ADCB98FE292750A200B51A03 /* KMBatchProcessingTableView.xib in Resources */,
@@ -9601,6 +9621,7 @@
 				BBAFC84F298519F700D0648E /* KMSavePanelAccessoryController.xib in Resources */,
 				BBEC00C4295C306400A26C98 /* KMBatesPropertyController.xib in Resources */,
 				9F8539D029430BF300DF644E /* KMBrowserWindowController.xib in Resources */,
+				ADE8BC2C29F7CDB000570F89 /* KMPageNumberDisplayView.xib in Resources */,
 				BBFE6E622930809A00142C01 /* KMMergeCollectionPageViewItem.xib in Resources */,
 				9F1F82B9292DEF370092C4B4 /* KMCloudDocumentsViewController.xib in Resources */,
 				ADBC374729CAD2D300D93208 /* SF-Pro-Text-Bold.otf in Resources */,
@@ -10118,6 +10139,7 @@
 				BBAFFB1B29CDD19C00C56112 /* KMMergeSelect.swift in Sources */,
 				ADD1B6BB29420B4A00C3FFF7 /* KMPrintPreviewView.swift in Sources */,
 				9F1F82B4292DEF370092C4B4 /* KMCloudDocumentsViewController.swift in Sources */,
+				ADE8BC2529F7CCA600570F89 /* KMPageNumberDisplayView.swift in Sources */,
 				BB4DD047299B294000E80DF6 /* KMCloudFileEmptyView.swift in Sources */,
 				89316846296E436B0073EA59 /* KMPDFSignatureImageView.m in Sources */,
 				ADD272D029B9CFD30032B5D6 /* KMLightNoNetworkView.swift in Sources */,
@@ -10876,6 +10898,7 @@
 				BBAFFB1C29CDD19C00C56112 /* KMMergeSelect.swift in Sources */,
 				9F78EFBC28F7C1CC001E66F4 /* KMHomeViewController.swift in Sources */,
 				9FBA0EEF28FFC716001117AF /* KMHomeFastToolViewController.swift in Sources */,
+				ADE8BC2629F7CCA600570F89 /* KMPageNumberDisplayView.swift in Sources */,
 				BB4DD048299B294000E80DF6 /* KMCloudFileEmptyView.swift in Sources */,
 				BB86C1FE28F54923005AD968 /* NSEvent_SKExtensions.m in Sources */,
 				ADD272D129B9CFD30032B5D6 /* KMLightNoNetworkView.swift in Sources */,
@@ -11698,6 +11721,7 @@
 				BB8115FD29924A5F0008F536 /* KMSecureEncryptCheckCellView.swift in Sources */,
 				9F78EFBD28F7C1CC001E66F4 /* KMHomeViewController.swift in Sources */,
 				BBC745EC295F067B0072C2ED /* KMCropSettingWindowController.swift in Sources */,
+				ADE8BC2729F7CCA600570F89 /* KMPageNumberDisplayView.swift in Sources */,
 				89316848296E436B0073EA59 /* KMPDFSignatureImageView.m in Sources */,
 				ADD1B6C92942E83000C3FFF7 /* KMPrintBottomView.swift in Sources */,
 				ADD1B7042946C8AD00C3FFF7 /* KMBaseTextField.swift in Sources */,

+ 366 - 0
PDF Office/PDF Master.xcodeproj/xcuserdata/lizhe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -3464,8 +3464,374 @@
                   endingLineNumber = "854"
                   offsetFromSymbolStart = "3116">
                </Location>
+               <Location
+                  uuid = "A9ECAAB1-38BB-4918-83CA-5C22F5C9553C - be8dfde593aa8219"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "closure #1 (PDF_Master.KMThumbnailViewController) -&gt; () in PDF_Master.KMThumbnailViewController.rotatePageItems(pageItems: Swift.Array&lt;PDF_Master.KMThumbnailPageItem&gt;, indexPaths: Swift.Set&lt;Foundation.IndexPath&gt;) -&gt; ()"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/LeftSide/Thumbnail/KMThumbnailViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "854"
+                  endingLineNumber = "854"
+                  offsetFromSymbolStart = "496">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "4CB41BAD-2D47-4804-9B45-961D7D5E7E7D"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/KMLightMember/Controller/Login&amp;Register/View/KMLoginInputPasswordView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "96"
+            endingLineNumber = "96"
+            landmarkName = "reloadData()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "CD9A0B65-2B3A-4A13-BE1D-4F1927C16817"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/KMLightMember/Controller/Login&amp;Register/View/KMResetPasswordView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "119"
+            endingLineNumber = "119"
+            landmarkName = "reloadData()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "060EDC4E-4B3B-4A0E-9DAE-662317BC3C90"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/KMLightMember/Controller/Login&amp;Register/View/KMRegisterView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "316"
+            endingLineNumber = "316"
+            landmarkName = "showPasswordAlert(result:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "77668ABB-B1DA-4532-9C42-0C64339A3C5E"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/KMLightMember/Controller/Login&amp;Register/View/KMRegisterView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "210"
+            endingLineNumber = "210"
+            landmarkName = "reloadData()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "FE5363E2-6F04-4C0F-8F71-B265C317D171"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/KMLightMember/Controller/Login&amp;Register/View/KMRegisterView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "247"
+            endingLineNumber = "247"
+            landmarkName = "controlTextDidChange(_:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "FE5363E2-6F04-4C0F-8F71-B265C317D171 - 30c98c3cd18e04b9"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Master.KMRegisterView.controlTextDidChange(Foundation.Notification) -&gt; ()"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/KMLightMember/Controller/Login&amp;Register/View/KMRegisterView.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "247"
+                  endingLineNumber = "247"
+                  offsetFromSymbolStart = "2900">
+               </Location>
+               <Location
+                  uuid = "FE5363E2-6F04-4C0F-8F71-B265C317D171 - 30c98c3cd18e055a"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Master.KMRegisterView.controlTextDidChange(Foundation.Notification) -&gt; ()"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/KMLightMember/Controller/Login&amp;Register/View/KMRegisterView.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "248"
+                  endingLineNumber = "248"
+                  offsetFromSymbolStart = "2860">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C109698E-1D32-4E5F-9470-05C21ACAB2BA"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/KMLightMember/Manager/KMRequestServerManager.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "267"
+            endingLineNumber = "267"
+            landmarkName = "logout(complete:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "C109698E-1D32-4E5F-9470-05C21ACAB2BA - 7bdf58dd940e0fae"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Master.KMRequestServerManager.logout(complete: (Swift.Bool, Swift.Optional&lt;PDF_Master.Result&gt;) -&gt; ()) -&gt; ()"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/KMLightMember/Manager/KMRequestServerManager.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "267"
+                  endingLineNumber = "267"
+                  offsetFromSymbolStart = "1112">
+               </Location>
+               <Location
+                  uuid = "C109698E-1D32-4E5F-9470-05C21ACAB2BA - d4264cf9d98a593"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "closure #1 (__C.AFHTTPRequestSerializer) -&gt; () in PDF_Master.KMRequestServerManager.logout(complete: (Swift.Bool, Swift.Optional&lt;PDF_Master.Result&gt;) -&gt; ()) -&gt; ()"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/KMLightMember/Manager/KMRequestServerManager.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "268"
+                  endingLineNumber = "268"
+                  offsetFromSymbolStart = "72">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D4BE526D-D8B4-4A8F-BF07-29A742892585"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/KMLightMember/Manager/KMRequestServerManager.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "272"
+            endingLineNumber = "272"
+            landmarkName = "logout(complete:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "D4BE526D-D8B4-4A8F-BF07-29A742892585 - 825e4e3cfd13fe65"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "closure #2 (Swift.Optional&lt;__C.NSURLSessionDataTask&gt;, Swift.Optional&lt;Swift.AnyObject&gt;, Swift.Optional&lt;__C.NSError&gt;) -&gt; () in PDF_Master.KMRequestServerManager.logout(complete: (Swift.Bool, Swift.Optional&lt;PDF_Master.Result&gt;) -&gt; ()) -&gt; ()"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/KMLightMember/Manager/KMRequestServerManager.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "272"
+                  endingLineNumber = "272"
+                  offsetFromSymbolStart = "140">
+               </Location>
+               <Location
+                  uuid = "D4BE526D-D8B4-4A8F-BF07-29A742892585 - 825e4e3cfd13fe65"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "closure #2 (Swift.Optional&lt;__C.NSURLSessionDataTask&gt;, Swift.Optional&lt;Swift.AnyObject&gt;, Swift.Optional&lt;__C.NSError&gt;) -&gt; () in PDF_Master.KMRequestServerManager.logout(complete: (Swift.Bool, Swift.Optional&lt;PDF_Master.Result&gt;) -&gt; ()) -&gt; ()"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/KMLightMember/Manager/KMRequestServerManager.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "272"
+                  endingLineNumber = "272"
+                  offsetFromSymbolStart = "200">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "9F124D91-7444-4057-84C5-9355993FE7A5"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/KMLightMember/Controller/Login&amp;Register/View/KMLoginInputPasswordView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "233"
+            endingLineNumber = "233"
+            landmarkName = "control(_:textView:doCommandBy:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "491C6FDE-EFE0-458E-9E36-C8F50B11F403"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/KMLightMember/Controller/Login&amp;Register/View/KMResetPasswordView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "282"
+            endingLineNumber = "282"
+            landmarkName = "control(_:textView:doCommandBy:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "70CC19BE-9C55-49DA-BB97-50BA782A6B8C"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/KMLightMember/Manager/KMRequestServerManager.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "361"
+            endingLineNumber = "361"
+            landmarkName = "getUserInfo2()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "0B87436A-BD87-4A42-ADA9-8B93888B97D0"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1708"
+            endingLineNumber = "1708"
+            landmarkName = "updateNextAndPreViousButtonState()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "888D606D-7723-49E0-BB36-E4A79A34BE4B"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/Views/KMPageNumberDisplayView/KMPageNumberDisplayView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "175"
+            endingLineNumber = "175"
+            landmarkName = "control(_:textView:doCommandBy:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "888D606D-7723-49E0-BB36-E4A79A34BE4B - 3b9e57319f85c5b3"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Master.KMPageNumberDisplayView.control(_: __C.NSControl, textView: __C.NSTextView, doCommandBy: ObjectiveC.Selector) -&gt; Swift.Bool"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/Views/KMPageNumberDisplayView/KMPageNumberDisplayView.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "145"
+                  endingLineNumber = "145"
+                  offsetFromSymbolStart = "820">
+               </Location>
+               <Location
+                  uuid = "888D606D-7723-49E0-BB36-E4A79A34BE4B - 3b9e57319f85c5b3"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Master.KMPageNumberDisplayView.control(_: __C.NSControl, textView: __C.NSTextView, doCommandBy: ObjectiveC.Selector) -&gt; Swift.Bool"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/Views/KMPageNumberDisplayView/KMPageNumberDisplayView.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "145"
+                  endingLineNumber = "145"
+                  offsetFromSymbolStart = "300">
+               </Location>
+               <Location
+                  uuid = "888D606D-7723-49E0-BB36-E4A79A34BE4B - 3b9e57319f853951"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Master.KMPageNumberDisplayView.control(_: __C.NSControl, textView: __C.NSTextView, doCommandBy: ObjectiveC.Selector) -&gt; Swift.Bool"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/Views/KMPageNumberDisplayView/KMPageNumberDisplayView.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "175"
+                  endingLineNumber = "175"
+                  offsetFromSymbolStart = "300">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "F49F79FA-AD2C-47FD-863E-453B926079E3"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/Views/KMPageNumberDisplayView/KMPageNumberDisplayView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "167"
+            endingLineNumber = "167"
+            landmarkName = "controlTextDidEndEditing(_:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 6 - 7
PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/MainWindowController.xib

@@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="MainWindowController" customModule="PDF_Office" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="MainWindowController" customModule="PDF_Master" customModuleProvider="target">
             <connections>
                 <outlet property="PDFContendView" destination="Jh3-gZ-0xB" id="3wr-A9-S9T"/>
                 <outlet property="childToolbarController" destination="LGo-eS-kH9" id="1OE-wT-t4D"/>
@@ -15,12 +14,12 @@
                 <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
             </connections>
         </customObject>
-        <viewController id="nx9-fp-KNE" customClass="KMMainToolbarController" customModule="PDF_Office" customModuleProvider="target">
+        <viewController id="nx9-fp-KNE" customClass="KMMainToolbarController" customModule="PDF_Master" customModuleProvider="target">
             <connections>
                 <outlet property="mainWindowController" destination="-2" id="tJb-kJ-4Rn"/>
             </connections>
         </viewController>
-        <viewController id="LGo-eS-kH9" customClass="KMToolbarViewController" customModule="PDF_Office" customModuleProvider="target">
+        <viewController id="LGo-eS-kH9" customClass="KMToolbarViewController" customModule="PDF_Master" customModuleProvider="target">
             <connections>
                 <outlet property="mainWindowController" destination="-2" id="s4s-qR-3td"/>
             </connections>
@@ -31,7 +30,7 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="196" y="240" width="1280" height="800"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1800" height="1125"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
             <value key="minSize" type="size" width="1198" height="629"/>
             <view key="contentView" id="se5-gp-TjO">
                 <rect key="frame" x="0.0" y="0.0" width="1280" height="800"/>

+ 12 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -2468,3 +2468,15 @@ extension KMMainViewController: KMReadModelViewDelegate {
         }
     }
 }
+
+extension KMMainViewController: KMPageNumberDisplayViewDelegate {
+    func gotoPageIndex(view: KMPageNumberDisplayView, pageIndex: Int) {
+        self.listView.go(toPageIndex: pageIndex, animated: true)
+    }
+    
+    func updateWidth(view: KMPageNumberDisplayView, width: CGFloat) {
+        if self.tipCurrentPageBoxWidthConstraint.constant != width {
+            self.tipCurrentPageBoxWidthConstraint.constant = width
+        }
+    }
+}

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift

@@ -340,7 +340,7 @@ extension KMMainViewController {
     }
     
     @IBAction func menuItemAction_hiddenPageIndicator(_ sender: Any) {
-        self.hiddenPageIndicator()
+        
     }
 }
 

+ 10 - 56
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift

@@ -45,6 +45,7 @@ extension KMMainViewController {
             self.listView.backgroundColor = KMPreferenceManager.shared.displayBackgroundNormalColor
             self.listView.layoutDocumentView()
         }
+        
         self.updatePageIndicatoreType()
         if (info.keys.contains(KMPreference.generalAuthorNameKey)) { // 作者名称
             CPDFKitConfig.sharedInstance().setAnnotationAuthor((info[KMPreference.generalAuthorNameKey] as! String))
@@ -59,63 +60,16 @@ extension KMMainViewController {
         }
     }
     
+    //刷新页面显示器
     func updatePageIndicatoreType () {
-        DispatchQueue.main.async {
-            if (KMPreferenceManager.shared.pageIndicatorIsShow) {
-                self.tipCurrentPageBox.isHidden = false
-                self.currentPageLabel.isHidden = false
-                self.pageCountLabel.isHidden = false
-            } else {
-                self.tipCurrentPageBox.isHidden = true
-                self.currentPageLabel.isHidden = true
-                self.pageCountLabel.isHidden = true
-            }
-        }
-        
-        if (KMPreferenceManager.shared.pageIndicatorType == .automatic) {
-            self.tipCurrentPageBox.moveCallback =  {(mouseEntered: Bool, mouseBox: KMBox) -> Void in
-                if mouseEntered == false  && self.isEditPage == false {
-                    self.tipCurrentPageBox.fillColor = NSColor(calibratedRed: 0, green: 0, blue: 0, alpha: 0.5)
-                    self.currentPageLabel.textColor = NSColor.white
-                    self.currentPageLabel.isHidden = false
-                    self.pageCountLabel.textColor = NSColor.white
-                    self.currentPageWidthConstraint.constant = NSString(string: self.currentPageLabel.stringValue).boundingRect(with: NSSize(width: 1000, height: 1000)).size.width + 8
-                    DispatchQueue.main.async {
-                        self.perform(#selector(self.delayExecution), with: nil, afterDelay: 3)
-                    }
-                } else {
-                    NSObject.cancelPreviousPerformRequests(withTarget: self)
-                }
-            }
-            DispatchQueue.main.async {
-                self.perform(#selector(self.delayExecution), with: nil, afterDelay: 3)
-            }
-        } else if (KMPreferenceManager.shared.pageIndicatorType == .always) {
-            self.tipCurrentPageBox.fillColor = NSColor(calibratedRed: 0, green: 0, blue: 0, alpha: 0.5)
-            self.currentPageLabel.textColor = NSColor.white
-            self.pageCountLabel.textColor = NSColor.white
-            self.currentPageWidthConstraint.constant = NSString(string: self.currentPageLabel.stringValue).boundingRect(with: NSSize(width: 1000, height: 1000)).size.width + 8
-        } else if (KMPreferenceManager.shared.pageIndicatorType == .never) {
-            self.delayExecution()
-        }
-    }
-    
-    @objc func delayExecution() {
-        if (KMPreferenceManager.shared.pageIndicatorType == .always) {
-            return
-        }
-        
-        self.hiddenPageIndicator()
-    }
-    
-    func hiddenPageIndicator() {
-        DispatchQueue.main.async {
-            self.currentPageLabel.isEditable = false
-            self.currentPageLabel.isHidden = true
-            self.currentPageLabel.isSelectable = false
-            self.tipCurrentPageBox.fillColor = NSColor.clear
-            self.currentPageLabel.textColor = NSColor.clear
-            self.pageCountLabel.textColor = NSColor.clear
+        if self.isReadMode {
+            self.pageNumberDisplayView.dismiss()
+        } else {
+            self.pageNumberDisplayView.totalPagesCount = Int(self.listView.document.pageCount)
+            self.pageNumberDisplayView.currentPageIndex = self.listView.currentPageIndex
+            self.pageNumberDisplayView.displayType = KMPreferenceManager.shared.pageIndicatorType
+            
+            self.readContentView.addSubview(self.tipCurrentPageBox, positioned: .above, relativeTo: self.readContentView)
         }
     }
 }

+ 17 - 54
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -15,9 +15,6 @@ import Cocoa
     @IBOutlet var secondaryPdfView: CPDFView!
     
     @IBOutlet weak var readContentView: NSView!
-    @IBOutlet weak var currentPageWidthConstraint: NSLayoutConstraint!
-    @IBOutlet weak var pageCountLabel: NSTextField!
-    @IBOutlet weak var currentPageLabel: NSTextField!
     @IBOutlet weak var tipCurrentPageBox: KMBox!
     @IBOutlet weak var rightView: NSView!
     @IBOutlet weak var leftView: NSView!
@@ -40,7 +37,10 @@ import Cocoa
     @IBOutlet weak var bottomAreaView: KMBox!
     var isReadMode: Bool = false
     
-    var isEditPage = false
+    //页码显示器
+    @IBOutlet weak var pageNumberDisplayView: KMPageNumberDisplayView!
+    @IBOutlet weak var tipCurrentPageBoxWidthConstraint: NSLayoutConstraint!
+    
     private var _needSave = false
     var needSave: Bool {
         set {
@@ -228,7 +228,6 @@ import Cocoa
         
         mwcFlags.settingUpWindow = 1
         toolbarController.delegate = self
-        self.currentPageLabel.delegate = self
         
         //TODO: 先让项目运行,看后面怎么调整这段逻辑,目前最外层是 KMBrowserWindowController
         toolbarBox.contentView = toolbarController.view
@@ -272,6 +271,17 @@ import Cocoa
         
         //阅读页面
         readModelView.delegate = self
+        pageNumberDisplayView.delegate = self
+        
+        tipCurrentPageBox.moveCallback = { [unowned self] mouseEntered, mouseBox in
+            if mouseEntered {
+                self.pageNumberDisplayView.hover = true
+                self.updatePageIndicatoreType()
+            } else {
+                self.pageNumberDisplayView.hover = false
+                self.updatePageIndicatoreType()
+            }
+        }
 
         NotificationCenter.default.addObserver(self, selector: #selector(rename(_:)), name: NSNotification.Name.init(rawValue: "KMTabControllerRename"), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(closeTab(_:)), name: NSNotification.Name.init(rawValue: "KMTabControllerCloseTabs"), object: nil)
@@ -685,18 +695,6 @@ import Cocoa
         
     }
     
-    func controlTextDidEndEditing(_ obj: Notification) {
-        let index = (Int(self.currentPageLabel.stringValue) ?? 0)
-        if index <= self.listView.document.pageCount {
-            self.listView.go(toPageIndex: index-1, animated: true)
-            self.currentPageLabel.resignFirstResponder()
-            self.isEditPage = false
-            self.currentPageLabel.backgroundColor = NSColor.clear
-            self.currentPageLabel.textColor = NSColor.clear
-            self.currentPageLabel.isEditable = false
-        }
-    }
-    
     func savePageNumberIfNeed() {
         if (KMPreferenceManager.shared.openLastUnlockedDocumentWhenAppStart) {
             KMPreferenceManager.shared.setPageNumber(self.listView.currentPageIndex, forKey: self.listView.document.documentURL.path)
@@ -1138,47 +1136,12 @@ import Cocoa
         let rightWidthNumber = UserDefaults.standard.object(forKey: CPDFOfficeRightSidePaneWidthKey) as? NSNumber ?? NSNumber(value: defaultRightWidth)
         
         applyLeftSideWidth(leftWidthNumber.doubleValue, rightSideWidth: rightWidthNumber.doubleValue)
-        self.currentPageLabel.stringValue = "\(pdfView.currentPageIndex+1)"
-        self.currentPageLabel.formatter = TextFieldFormatter()
-        self.currentPageLabel.isEditable = false
-        self.currentPageWidthConstraint.constant = NSString(string: self.currentPageLabel.stringValue).boundingRect(with: NSSize(width: 1000, height: 1000)).size.width + 8
-        self.currentPageLabel.backgroundColor = NSColor.clear
-        self.pageCountLabel.stringValue = "/ \(pdfView.document.pageCount)"
-        self.pageCountLabel.textColor = NSColor.clear
-        self.tipCurrentPageBox.fillColor = NSColor.clear
-        self.currentPageLabel.textColor = NSColor.clear
-        self.currentPageLabel.isSelectable = false
-        self.updatePageIndicatoreType()
         
-        self.tipCurrentPageBox.downCallback =  { [unowned self] (mouseEntered: Bool, mouseBox: KMBox, event) -> Void in
-            self.currentPageLabel.backgroundColor = NSColor.white
-            self.currentPageLabel.textColor = NSColor.black
-            if self.currentPageWidthConstraint.constant < 40 {
-                self.currentPageWidthConstraint.constant = 40;
-            }
-            self.currentPageLabel.becomeFirstResponder()
-            self.currentPageLabel.isEditable = true
-            self.isEditPage = true
-        }
+        self.updatePageIndicatoreType()
     }
     
     func pdfViewCurrentPageDidChanged(_ pdfView: CPDFView!) {
-        NSObject.cancelPreviousPerformRequests(withTarget:self)
-        self.currentPageLabel.stringValue = "\(pdfView.currentPageIndex+1)"
-        self.pageCountLabel.stringValue = "/ \(pdfView.document.pageCount)"
-        self.currentPageWidthConstraint.constant = NSString(string: self.currentPageLabel.stringValue).boundingRect(with: NSSize(width: 1000, height: 1000)).size.width + 8
-        self.tipCurrentPageBox.fillColor = NSColor(calibratedRed: 0, green: 0, blue: 0, alpha: 0.5)
-        self.currentPageLabel.textColor = NSColor.white
-        self.currentPageLabel.isHidden = false
-        self.currentPageLabel.isSelectable = false
-        self.pageCountLabel.textColor = NSColor.white
-        self.readContentView.addSubview(self.tipCurrentPageBox, positioned: NSWindow.OrderingMode.above, relativeTo: self.listView)
-        //刷新顶部
-        self.updateNextAndPreViousButtonState()
-        DispatchQueue.main.async {
-            self.perform(#selector(self.delayExecution), with: nil, afterDelay: 3)
-        }
-        
+        self.updatePageIndicatoreType()
         NotificationCenter.default.post(name: NSNotification.Name.init(rawValue: "KMPDFViewCurrentPageDidChanged"), object: self.document)
         print("KMPDFViewCurrentPageDidChanged")
     }

+ 15 - 32
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.xib

@@ -10,15 +10,13 @@
                 <outlet property="PDFContendView" destination="yMu-ou-GV9" id="diy-Q0-PHp"/>
                 <outlet property="bottomAreaView" destination="z7q-Gv-vF1" id="7WI-Yd-Ayi"/>
                 <outlet property="childToolbarController" destination="2rl-M4-8Gt" id="qVG-Sq-Xvd"/>
-                <outlet property="currentPageLabel" destination="kHz-8i-2Ir" id="Wov-dw-zjF"/>
-                <outlet property="currentPageWidthConstraint" destination="Yoy-cc-qDA" id="b1P-uT-j4T"/>
                 <outlet property="exitFullButton" destination="Qt3-H1-Txz" id="4bA-7e-JGM"/>
                 <outlet property="heightOffset" destination="iA2-6j-Qjy" id="jkh-Z9-By7"/>
                 <outlet property="leftView" destination="vrW-lc-OvI" id="VkU-t5-h1z"/>
                 <outlet property="listView" destination="Cdz-fv-u4h" id="BLf-Jo-GG8"/>
                 <outlet property="locationPageView" destination="lNB-M6-fxu" id="HMk-jd-IjS"/>
                 <outlet property="mianSplitView" destination="uhq-Ou-HaH" id="BSo-qg-XXn"/>
-                <outlet property="pageCountLabel" destination="IvG-Qi-w42" id="y9q-JW-GAb"/>
+                <outlet property="pageNumberDisplayView" destination="WjC-fF-x99" id="TH2-oe-F6s"/>
                 <outlet property="pdfContentView" destination="2Kn-qX-BRm" id="K5Y-gR-sT6"/>
                 <outlet property="pdfSplitSecondView" destination="Zhm-9e-eFs" id="I1I-R1-1We"/>
                 <outlet property="pdfSplitView" destination="r2n-G7-pBF" id="zCH-LA-o4V"/>
@@ -27,6 +25,7 @@
                 <outlet property="rightView" destination="0Bt-mG-vsA" id="pZR-oX-ScK"/>
                 <outlet property="secondaryPdfView" destination="Cyg-1v-mQT" id="FJh-z9-Seg"/>
                 <outlet property="tipCurrentPageBox" destination="zKE-Pq-I7d" id="CYY-Lt-phh"/>
+                <outlet property="tipCurrentPageBoxWidthConstraint" destination="z3X-e4-sUM" id="uXT-Me-dKQ"/>
                 <outlet property="tipLabel" destination="wp0-L3-5I3" id="DWH-os-mvm"/>
                 <outlet property="toolbarBox" destination="fsa-Dd-jjO" id="IWg-8f-X0p"/>
                 <outlet property="toolbarController" destination="IRu-me-bV3" id="FYz-uc-cky"/>
@@ -82,49 +81,33 @@ Gw
                                             </constraints>
                                         </customView>
                                         <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="zKE-Pq-I7d" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="4" y="14" width="60" height="24"/>
+                                            <rect key="frame" x="16" y="16" width="82" height="36"/>
                                             <view key="contentView" id="cbK-wK-42I">
-                                                <rect key="frame" x="0.0" y="0.0" width="60" height="24"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="82" height="36"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                 <subviews>
-                                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IvG-Qi-w42">
-                                                        <rect key="frame" x="48" y="5" width="4" height="14"/>
-                                                        <textFieldCell key="cell" lineBreakMode="clipping" id="GCY-mm-j3K">
-                                                            <font key="font" metaFont="smallSystem"/>
-                                                            <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                                        </textFieldCell>
-                                                    </textField>
-                                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kHz-8i-2Ir">
-                                                        <rect key="frame" x="10" y="4" width="40" height="16"/>
-                                                        <constraints>
-                                                            <constraint firstAttribute="width" constant="40" id="Yoy-cc-qDA"/>
-                                                        </constraints>
-                                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" focusRingType="none" alignment="left" drawsBackground="YES" id="GPI-iI-CYb">
-                                                            <font key="font" metaFont="system"/>
-                                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                                        </textFieldCell>
-                                                    </textField>
+                                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="WjC-fF-x99" customClass="KMPageNumberDisplayView" customModule="PDF_Master" customModuleProvider="target">
+                                                        <rect key="frame" x="0.0" y="0.0" width="82" height="36"/>
+                                                    </customView>
                                                 </subviews>
                                                 <constraints>
-                                                    <constraint firstAttribute="trailing" secondItem="IvG-Qi-w42" secondAttribute="trailing" constant="10" id="F1V-bh-vlz"/>
-                                                    <constraint firstItem="kHz-8i-2Ir" firstAttribute="centerY" secondItem="IvG-Qi-w42" secondAttribute="centerY" id="erU-Q8-goB"/>
-                                                    <constraint firstItem="IvG-Qi-w42" firstAttribute="leading" secondItem="kHz-8i-2Ir" secondAttribute="trailing" id="ffd-Rp-Scm"/>
-                                                    <constraint firstItem="kHz-8i-2Ir" firstAttribute="leading" secondItem="cbK-wK-42I" secondAttribute="leading" constant="10" id="rU5-07-ztP"/>
+                                                    <constraint firstItem="WjC-fF-x99" firstAttribute="top" secondItem="cbK-wK-42I" secondAttribute="top" id="KCR-y4-bsp"/>
+                                                    <constraint firstAttribute="bottom" secondItem="WjC-fF-x99" secondAttribute="bottom" id="LEG-lv-ufS"/>
+                                                    <constraint firstAttribute="trailing" secondItem="WjC-fF-x99" secondAttribute="trailing" id="YBc-Lb-UZM"/>
+                                                    <constraint firstItem="WjC-fF-x99" firstAttribute="leading" secondItem="cbK-wK-42I" secondAttribute="leading" id="upx-Do-uTP"/>
                                                 </constraints>
                                             </view>
                                             <constraints>
-                                                <constraint firstItem="IvG-Qi-w42" firstAttribute="centerY" secondItem="zKE-Pq-I7d" secondAttribute="centerY" id="tzv-gK-tEn"/>
-                                                <constraint firstAttribute="height" constant="24" id="yPh-H7-5s2"/>
+                                                <constraint firstAttribute="height" constant="36" id="yPh-H7-5s2"/>
+                                                <constraint firstAttribute="width" constant="82" id="z3X-e4-sUM"/>
                                             </constraints>
                                         </box>
                                     </subviews>
                                     <constraints>
-                                        <constraint firstItem="zKE-Pq-I7d" firstAttribute="leading" secondItem="Qs2-A4-zLE" secondAttribute="leading" constant="4" id="3s6-Bj-2o2"/>
+                                        <constraint firstItem="zKE-Pq-I7d" firstAttribute="leading" secondItem="Qs2-A4-zLE" secondAttribute="leading" constant="16" id="3s6-Bj-2o2"/>
                                         <constraint firstAttribute="bottom" secondItem="3E1-9V-2lu" secondAttribute="bottom" constant="16" id="DW1-wF-7bS"/>
                                         <constraint firstItem="Cdz-fv-u4h" firstAttribute="leading" secondItem="Qs2-A4-zLE" secondAttribute="leading" id="HaE-rw-x9w"/>
-                                        <constraint firstAttribute="bottom" secondItem="zKE-Pq-I7d" secondAttribute="bottom" constant="14" id="KgI-r0-IvY"/>
+                                        <constraint firstAttribute="bottom" secondItem="zKE-Pq-I7d" secondAttribute="bottom" constant="16" id="KgI-r0-IvY"/>
                                         <constraint firstItem="Cdz-fv-u4h" firstAttribute="top" secondItem="Qs2-A4-zLE" secondAttribute="top" id="OKy-PG-6NE"/>
                                         <constraint firstItem="3E1-9V-2lu" firstAttribute="centerX" secondItem="Qs2-A4-zLE" secondAttribute="centerX" id="OOC-jQ-Ybs"/>
                                         <constraint firstAttribute="bottom" secondItem="Cdz-fv-u4h" secondAttribute="bottom" id="QSL-Y5-hK2"/>

+ 243 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/Views/KMPageNumberDisplayView/KMPageNumberDisplayView.swift

@@ -0,0 +1,243 @@
+//
+//  KMPageNumberDisplayView.swift
+//  PDF Master
+//
+//  Created by lizhe on 2023/4/25.
+//
+
+import Cocoa
+
+protocol KMPageNumberDisplayViewDelegate: NSObject {
+    func gotoPageIndex(view: KMPageNumberDisplayView, pageIndex: Int)
+    func updateWidth(view: KMPageNumberDisplayView, width: CGFloat)
+}
+
+
+class KMPageNumberDisplayView: KMBaseXibView {
+
+    @IBOutlet weak var totalPageCountLabel: NSTextField!
+    @IBOutlet weak var pageWidthConstraint: NSLayoutConstraint!
+    @IBOutlet weak var lineLabel: NSTextFieldCell!
+    @IBOutlet weak var currentPageIndexLabel: FocusAwareTextField!
+    @IBOutlet weak var currentPageContentView: NSView!
+    @IBOutlet weak var pageLabelConstraint: NSLayoutConstraint!
+    
+    var displayType: KMPreferencePageIndicatorDisplayType? {
+        didSet {
+            self.updateViewDispaly()
+        }
+    }
+    
+    var timer: Timer?
+    weak var delegate: KMPageNumberDisplayViewDelegate?
+    
+    var currentPageIndex: Int? {
+        didSet {
+            let string = (currentPageIndex! + 1).description
+            self.currentPageIndexLabel.stringValue = string
+            self.updateUI()
+        }
+    }
+    
+    var totalPagesCount: Int? {
+        didSet {
+            self.totalPageCountLabel.stringValue = totalPagesCount?.description ?? "1"
+            self.updateUI()
+        }
+    }
+    
+    var hover: Bool = false {
+        didSet{
+            self.updateViewDispaly()
+        }
+    }
+    
+    var isEdit: Bool = false {
+        didSet {
+            self.currentPageIndexLabel.isEditable = isEdit
+            self.updateUI()
+        }
+    }
+    
+    deinit {
+        self.dismiss()
+    }
+    
+    override func draw(_ dirtyRect: NSRect) {
+        super.draw(dirtyRect)
+
+        // Drawing code here.
+
+    }
+
+    override func setup() {
+        self.backgroundColor(NSColor(hex: "#36383B"))
+        self.shadow = NSShadow()
+        self.wantsLayer = true
+        self.layer?.shadowColor = NSColor(hex: "#000000", alpha: 0.16).cgColor
+        self.layer?.shadowOffset = CGSize(width: 0, height: -2)
+        self.layer?.shadowRadius = 8
+        self.layer?.shadowOpacity = 1
+        self.layer?.cornerRadius = 4
+        
+        self.currentPageIndexLabel.delegate = self
+    }
+    
+    //刷新界面UI 和 数据
+    override func reloadData() {
+        
+    }
+    
+    override func updateLanguage() {
+
+    }
+    
+    override func updateUI() {
+//        NSString(string: self.currentPageLabel.stringValue).boundingRect(with: NSSize(width: 1000, height: 1000)).size.width + 8
+        self.totalPageCountLabel.textColor = NSColor(hex: "#FFFFFF")
+        self.totalPageCountLabel.font = NSFont.SFProTextRegular(12.0)
+        
+        self.lineLabel.textColor = NSColor(hex: "#FFFFFF")
+        self.lineLabel.font = NSFont.SFProTextRegular(12.0)
+        
+        if isEdit {
+            currentPageIndexLabel.textColor = NSColor(hex: "#252629")
+            currentPageIndexLabel.font = NSFont.SFProTextRegular(12.0)
+            
+            currentPageContentView.backgroundColor(NSColor(hex: "#FFFFFF"))
+            currentPageContentView.border(NSColor(hex: "#DFE1E5"), 1, 4)
+            
+        } else {
+            currentPageIndexLabel.textColor = NSColor(hex: "#FFFFFF")
+            currentPageIndexLabel.font = NSFont.SFProTextRegular(12.0)
+            
+            currentPageContentView.backgroundColor(NSColor(hex: "#FFFFFF", alpha: 0))
+            currentPageContentView.border(NSColor(hex: "#DFE1E5"), 0, 4)
+        }
+
+        self.delegate?.updateWidth(view: self, width: self.fetchWith(edit: self.isEdit))
+    }
+    
+    override func resetData() {
+        
+    }
+    
+    override func addNotification() {
+        
+    }
+    
+    override func removeNotification() {
+        
+    }
+    
+    func fetchWith(edit: Bool = false) -> CGFloat {
+        let currentIndexString: NSString = self.currentPageIndexLabel.stringValue as NSString
+        let totalPageCountString: NSString = self.totalPageCountLabel.stringValue as NSString
+        
+        let attributes = [NSAttributedString.Key.font : NSFont.SFProTextRegular(12.0), NSAttributedString.Key.foregroundColor: NSColor(hex: "#FFFFFF")]
+        let currentIndexStringWidth = currentIndexString.boundingRect(with: CGSize(width: 100, height: 36), attributes: attributes).width
+        let totalPageCountStringWidth = totalPageCountString.boundingRect(with: CGSize(width: 100, height: 36), attributes: attributes).width
+        
+        var width = 16 + currentIndexStringWidth + 8 + 4 + 8 + totalPageCountStringWidth + 16
+        if edit {
+            self.pageWidthConstraint.constant = currentIndexStringWidth + 40
+            self.pageLabelConstraint.constant = currentIndexStringWidth + 24
+            width += 40
+        } else {
+            self.pageWidthConstraint.constant = currentIndexStringWidth
+            self.pageLabelConstraint.constant = currentIndexStringWidth
+        }
+        
+        return width
+    }
+}
+
+//MARK: mouse
+extension KMPageNumberDisplayView {
+    override func mouseDown(with event: NSEvent) {
+        print("mouseDown")
+        self.isEdit = true
+        self.delegate?.updateWidth(view: self, width: self.fetchWith(edit: self.isEdit))
+    }
+}
+
+//MARK:
+extension KMPageNumberDisplayView: NSTextFieldDelegate {
+    func controlTextDidEndEditing(_ obj: Notification) {
+//        self.toPageIndex()
+    }
+    
+    func control(_ control: NSControl, textView: NSTextView, doCommandBy commandSelector: Selector) -> Bool {
+        switch commandSelector {
+        case #selector(NSResponder.insertNewline(_:)):
+            if let inputView = control as? NSTextField {
+                //当当前TextField按下enter
+                if (textView.string == self.currentPageIndexLabel.stringValue) {
+                    print("按下 enter")
+                    self.isEdit = false
+                    self.toPageIndex()
+                }
+            }
+            return true
+        default:
+            return false
+        }
+    }
+    
+    func toPageIndex() {
+        let index = max((Int(self.currentPageIndexLabel.stringValue) ?? 1) - 1, 0)
+        self.delegate?.gotoPageIndex(view: self, pageIndex: index)
+        self.updateUI()
+    }
+}
+
+//MARK: In out
+extension KMPageNumberDisplayView {
+    @objc fileprivate func inView() {
+        self.dismiss()
+        NSAnimationContext.runAnimationGroup { NSAnimationContext in
+            self.animator().alphaValue = 1
+        }
+    }
+    
+    @objc fileprivate func outView() {
+        NSAnimationContext.runAnimationGroup { NSAnimationContext in
+            self.animator().alphaValue = 0
+            self.dismiss()
+        }
+    }
+    
+    func reset() {
+        self.dismiss()
+        self.show()
+    }
+    
+    func show(type: KMPreferencePageIndicatorDisplayType = .automatic) {
+        self.displayType = type
+    }
+    
+    func dismiss() {
+        self.timer?.invalidate()
+        self.timer = nil
+        self.isEdit = false
+    }
+    
+    func updateViewDispaly() {
+        var type = self.displayType
+        if hover {
+            type = .always
+        }
+        
+        if type == .automatic {
+            if self.timer != nil {
+                self.dismiss()
+            }
+            self.inView()
+            self.timer = Timer.scheduledTimer(timeInterval: 3.0, target: self, selector: #selector(outView), userInfo: nil, repeats: true)
+        } else if type == .never {
+            self.dismiss()
+        } else if type == .always {
+            self.inView()
+        }
+    }
+}

+ 77 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/Views/KMPageNumberDisplayView/KMPageNumberDisplayView.xib

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMPageNumberDisplayView" customModule="PDF_Master" customModuleProvider="target">
+            <connections>
+                <outlet property="currentPageContentView" destination="gJg-sG-1CY" id="G2q-0O-ver"/>
+                <outlet property="currentPageIndexLabel" destination="3n5-KD-s32" id="8qc-Ay-Zxz"/>
+                <outlet property="lineLabel" destination="uTi-F8-kIG" id="jDg-j3-531"/>
+                <outlet property="pageLabelConstraint" destination="VUm-P2-vy4" id="NWb-sU-hGe"/>
+                <outlet property="pageWidthConstraint" destination="HT1-xs-GIh" id="503-kq-nLE"/>
+                <outlet property="totalPageCountLabel" destination="RaO-wJ-uzS" id="u4O-5H-7bH"/>
+            </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="79" height="89"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RaO-wJ-uzS">
+                    <rect key="frame" x="37" y="37" width="28" height="16"/>
+                    <textFieldCell key="cell" lineBreakMode="clipping" title="200" id="bKR-hk-ZSb">
+                        <font key="font" usesAppearanceFont="YES"/>
+                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fI8-Fp-pUK">
+                    <rect key="frame" x="32" y="37" width="8" height="16"/>
+                    <textFieldCell key="cell" lineBreakMode="clipping" title="/" id="uTi-F8-kIG">
+                        <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>
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="gJg-sG-1CY">
+                    <rect key="frame" x="16" y="33" width="10" height="24"/>
+                    <subviews>
+                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3n5-KD-s32" customClass="FocusAwareTextField" customModule="PDF_Master" customModuleProvider="target">
+                            <rect key="frame" x="0.0" y="4" width="10" height="16"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="6" id="VUm-P2-vy4"/>
+                            </constraints>
+                            <textFieldCell key="cell" lineBreakMode="clipping" title="1" id="mvn-Gb-HVw">
+                                <font key="font" usesAppearanceFont="YES"/>
+                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                <allowedInputSourceLocales>
+                                    <string>NSAllRomanInputSourcesLocaleIdentifier</string>
+                                </allowedInputSourceLocales>
+                            </textFieldCell>
+                        </textField>
+                    </subviews>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="10" id="HT1-xs-GIh"/>
+                        <constraint firstItem="3n5-KD-s32" firstAttribute="centerY" secondItem="gJg-sG-1CY" secondAttribute="centerY" id="KYC-HH-P9q"/>
+                        <constraint firstAttribute="height" constant="24" id="S4t-mP-L05"/>
+                        <constraint firstItem="3n5-KD-s32" firstAttribute="centerX" secondItem="gJg-sG-1CY" secondAttribute="centerX" id="pdR-8c-u8M"/>
+                    </constraints>
+                </customView>
+            </subviews>
+            <constraints>
+                <constraint firstItem="fI8-Fp-pUK" firstAttribute="leading" secondItem="gJg-sG-1CY" secondAttribute="trailing" constant="8" id="0cE-lW-Xj1"/>
+                <constraint firstItem="fI8-Fp-pUK" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="1qA-Hy-6Hd"/>
+                <constraint firstItem="RaO-wJ-uzS" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="5ST-2R-T7B"/>
+                <constraint firstItem="gJg-sG-1CY" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="ABZ-Yk-8zJ"/>
+                <constraint firstAttribute="trailing" secondItem="RaO-wJ-uzS" secondAttribute="trailing" constant="16" id="InF-ED-RqW"/>
+                <constraint firstItem="gJg-sG-1CY" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="16" id="S0Z-ju-eb9"/>
+            </constraints>
+            <point key="canvasLocation" x="170.5" y="275.5"/>
+        </customView>
+    </objects>
+</document>

+ 0 - 6
PDF Office/PDF Master/Class/Preference/Tools/KMPreferenceManager.swift

@@ -1148,12 +1148,6 @@ extension KMPreferenceManager {
         }
     }
     
-    var pageIndicatorIsShow: Bool {
-        get {
-            return KMPreferenceManager.shared.pageIndicatorType != .never
-        }
-    }
-    
     // 单位: 秒
     var autoSaveTimeInterval: TimeInterval {
         get {