Browse Source

【2025】【View】阅读模式逻辑处理

niehaoyu 4 months ago
parent
commit
3b07315756

+ 18 - 2
PDF Office/PDF Master/KMClass/KMPDFViewController/KMPDFViewController.swift

@@ -183,9 +183,9 @@ class KMPDFViewController: NSViewController {
     func updatePDFDisplaySettingView() {
         
         if viewManager.showDisplayView {
-            infoSplitViewLeftConst.constant = 264 - CGRectGetWidth(sidebarBox.frame)
+            infoSplitViewLeftConst.constant = 264
         } else {
-            infoSplitViewLeftConst.constant = 0
+            infoSplitViewLeftConst.constant = 44
         }
         
         if viewManager.showDisplayView {
@@ -228,11 +228,25 @@ class KMPDFViewController: NSViewController {
     
     //MARK: - 阅读模式
     func openPDFReadMode() {
+        if viewManager.showDisplayView {
+            viewManager.showDisplayView = false
+            pdfToolbarController?.reloadLeftIconView()
+            
+            updatePDFDisplaySettingView()
+        }
+        infoSplitViewLeftConst.constant = 0
+        toolbarBoxHeightConst.constant = 0
+        
         
     }
     
     func exitPDFReadMode() {
+        viewManager.isPDFReadMode = false
         
+        infoSplitViewLeftConst.constant = 44
+        
+        refreshToolbarView()
+
     }
     
     //MARK: - PPT
@@ -524,6 +538,8 @@ extension KMPDFViewController: CPDFListViewDelegate {
             //阅读模式
             if viewManager.isPDFReadMode {
                 exitPDFReadMode()
+                viewManager.isPDFReadMode = false
+                
                 return true
             }
             

+ 8 - 8
PDF Office/PDF Master/KMClass/KMPDFViewController/KMPDFViewController.xib

@@ -63,26 +63,26 @@
                                             </constraints>
                                         </box>
                                         <splitView dividerStyle="paneSplitter" vertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jZO-Qi-MGE" customClass="KMPDFSplitView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                                            <rect key="frame" x="44" y="0.0" width="661" height="367"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="705" height="367"/>
                                             <subviews>
                                                 <customView fixedFrame="YES" id="opq-Wz-3ie">
-                                                    <rect key="frame" x="0.0" y="0.0" width="213" height="367"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="227" height="367"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                                                 </customView>
                                                 <customView fixedFrame="YES" id="krU-O7-hdU">
-                                                    <rect key="frame" x="223" y="0.0" width="214" height="367"/>
+                                                    <rect key="frame" x="237" y="0.0" width="229" height="367"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES"/>
                                                     <subviews>
                                                         <splitView fixedFrame="YES" arrangesAllSubviews="NO" dividerStyle="paneSplitter" translatesAutoresizingMaskIntoConstraints="NO" id="fT8-5X-scJ">
-                                                            <rect key="frame" x="0.0" y="0.0" width="214" height="367"/>
+                                                            <rect key="frame" x="0.0" y="0.0" width="229" height="367"/>
                                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                             <subviews>
                                                                 <customView fixedFrame="YES" id="wwY-lO-fRn">
-                                                                    <rect key="frame" x="0.0" y="0.0" width="214" height="174"/>
+                                                                    <rect key="frame" x="0.0" y="0.0" width="229" height="174"/>
                                                                     <autoresizingMask key="autoresizingMask"/>
                                                                 </customView>
                                                                 <customView fixedFrame="YES" id="prz-4I-oP3">
-                                                                    <rect key="frame" x="0.0" y="184" width="214" height="183"/>
+                                                                    <rect key="frame" x="0.0" y="184" width="229" height="183"/>
                                                                     <autoresizingMask key="autoresizingMask"/>
                                                                 </customView>
                                                             </subviews>
@@ -94,7 +94,7 @@
                                                     </subviews>
                                                 </customView>
                                                 <customView fixedFrame="YES" id="fQ5-nZ-gTu">
-                                                    <rect key="frame" x="447" y="0.0" width="214" height="367"/>
+                                                    <rect key="frame" x="476" y="0.0" width="229" height="367"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES"/>
                                                 </customView>
                                             </subviews>
@@ -112,7 +112,7 @@
                                         <constraint firstAttribute="trailing" secondItem="jZO-Qi-MGE" secondAttribute="trailing" id="buB-Vk-i8s"/>
                                         <constraint firstItem="Unz-BN-IQn" firstAttribute="top" secondItem="b6b-kg-L7X" secondAttribute="top" id="nhP-Ix-zLc"/>
                                         <constraint firstItem="jZO-Qi-MGE" firstAttribute="top" secondItem="b6b-kg-L7X" secondAttribute="top" id="thV-vU-JKc"/>
-                                        <constraint firstItem="jZO-Qi-MGE" firstAttribute="leading" secondItem="Unz-BN-IQn" secondAttribute="trailing" id="vvk-JB-o5G"/>
+                                        <constraint firstItem="jZO-Qi-MGE" firstAttribute="leading" secondItem="b6b-kg-L7X" secondAttribute="leading" id="vvk-JB-o5G"/>
                                     </constraints>
                                 </view>
                             </box>

+ 0 - 32
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -628,22 +628,6 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "B741EEF9-4037-4B9A-9098-14F12C32E55A"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KMComponentLibrary/KMComponentLibrary/View/Select/SelectZoom/ComponentSelectZoom.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "262"
-            endingLineNumber = "262"
-            landmarkName = "mouseUp(with:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -1988,22 +1972,6 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "D15B989F-244A-4566-82C8-13815A2F767F"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KMComponentLibrary/KMComponentLibrary/View/Select/SelectZoom/ComponentSelectZoom.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "246"
-            endingLineNumber = "246"
-            landmarkName = "mouseDown(with:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent