Pārlūkot izejas kodu

Merge branch 'develop_PDFReaderProV4.6.1' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProV4.6.1

tangchao 5 mēneši atpakaļ
vecāks
revīzija
8522eebf73

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

@@ -102,6 +102,11 @@ extension KMBrowserWindowController {
         self.hideLeftSideWindow()
         self.hideRightSideWindow()
 
+        let doc = self.document as? KMMainDocument
+       let mainViewController = doc?.mainViewController
+        
+        mainViewController?.presentationTopViewController?.view.removeFromSuperview()
+
         // do this first, otherwise the navigation window may be covered by fadeWindow and then reveiled again, which looks odd
 //        [pdfView setInteractionMode:SKNormalMode];
 //

+ 11 - 3
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -1941,10 +1941,18 @@ import Cocoa
                 let point = event.locationInView(self?.listView ?? NSView())
                 let presentationDrawView = self?.listView.presentationDrawView
                 if let data = self?.interactionMode, data == .presentation,CGRectContainsPoint(self?.listView.frame ?? .zero, point),presentationDrawView?.isHidden == true { // 幻灯片模式下
-                    let can = self?.listView?.canGoToNextPage() ?? false
-                    if can {
-                        self?.listView.goToNextPage(nil)
+                    if point.x >= (self?.listView.frame.maxX ?? 0) / 2 {
+                        let can = self?.listView?.canGoToNextPage() ?? false
+                        if can {
+                            self?.listView.goToNextPage(nil)
+                        }
+                    } else {
+                        let can = self?.listView?.canGoToPreviousPage() ?? false
+                        if can {
+                            self?.listView.goToPreviousPage(nil)
+                        }
                     }
+                    
                     return nil
                 }
             }