3
0

2 Commits 794a46e83c ... 88b7b53185

Autor SHA1 Nachricht Datum
  liaoxiaoyue 88b7b53185 【页面编辑】- 点击页面编辑缩略图退出模式方式修改 vor 1 Jahr
  liaoxiaoyue 573151f1ec 【工具栏】- 放大缩小按钮状态修改 vor 1 Jahr

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

@@ -1273,6 +1273,21 @@ extension KMMainViewController {
             toItem.unEnabled = true
         }
     }
+    
+    func updateZoomInOutButtonState() {
+        let item : KMToolBoxItem = (self.toolbarController.mainToolBarView?.toolbarItemFindItemIdentifiers(value: KMDocumentZoomToolbarItemIdentifier))!
+        let toItem : KMToolBoxItem = (self.toolbarController.mainToolBarView?.toolbarItemFindItemIdentifiers(value: KMDocumentZoomOutToolbarItemIdentifier))!
+        if self.listView.canZoomIn {
+            item.unEnabled = false
+        } else {
+            item.unEnabled = true
+        }
+        if self.listView.canZoomOut {
+            toItem.unEnabled = false
+        } else {
+            toItem.unEnabled = true
+        }
+    }
 }
 
 extension KMMainViewController: KMSecondaryViewControllerDelegate {
@@ -1349,10 +1364,12 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
     
     func changePDFViewZoomInAction() {
         self.listView.zoomIn(nil)
+        self.updateZoomInOutButtonState()
     }
     
     func changePDFViewZoomOutAction() {
         self.listView.zoomOut(nil)
+        self.updateZoomInOutButtonState()
     }
     
     func changePDFViewGotoNextPageAction() {

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

@@ -287,8 +287,7 @@ import Cocoa
         controller.itemClick = {
             [weak self] (index: Int, param: Any) in
             if (index == 1) { /// 双击退出
-                self?.exitPageEdit()
-                
+                self?.enterEditMode(self!.leftSideViewController)
                 DispatchQueue.main.async {
                     let pageIndex: Int = param as! Int
                     self?.listView.go(toPageIndex: pageIndex, animated: true)