3 Commits 15411c11df ... 15a46e5420

Tác giả SHA1 Thông báo Ngày
  liaoxiaoyue 15a46e5420 【内容工具】- 打印添加快捷键 1 năm trước cách đây
  liaoxiaoyue 68cd33e85e 【工具栏】- 点击页面显示时工具栏状态刷新 1 năm trước cách đây
  liaoxiaoyue 22185b9510 【PDFView】- 页码指示器显示优化 1 năm trước cách đây

+ 4 - 2
PDF Office/PDF Office/Class/PDFWindowController/Toolbar/KMToolbarController.swift

@@ -386,8 +386,10 @@ extension KMToolbarController: KMToolbarViewControllerDelegate {
     }
     
     func toolbarViewController(_ viewController: KMToolbarViewController, clickMode toolMode: KMToolbarViewType, toolbar toolbarItem: KMToolBoxItem) {
-        if toolMode != .Magnify && toolMode != .Move && toolMode != .Select && toolMode != .SelectZoom && toolMode != .LeftPanel && toolMode != .RightPanel {
+        if self.lastItemBox != nil {
             self.lastItemBox.isSelected = false
+        }
+        if toolMode != .Magnify && toolMode != .Move && toolMode != .Select && toolMode != .SelectZoom && toolMode != .LeftPanel && toolMode != .RightPanel {
             if(toolMode == self.toolbarType) {
                 toolbarItem.isSelected = false
             } else {
@@ -395,7 +397,7 @@ extension KMToolbarController: KMToolbarViewControllerDelegate {
                 self.lastItemBox = toolbarItem
             }
         } else {
-            if(toolMode != self.toolbarType) {
+            if(toolMode != self.toolbarType && toolMode != .LeftPanel) {
                 let item : KMToolBoxItem = (self.mainToolBarView?.toolbarItemFindItemIdentifiers(value: KMDocumentAnnotationToolbarItemIdentifier))!
                 item.isSelected = true
                 self.lastItemBox = item

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

@@ -290,7 +290,7 @@ extension KMMainViewController {
     }
     
     func printingMenu() -> NSMenuItem {
-        let menuItem = NSMenuItem(title: NSLocalizedString("Print", comment: ""), action: #selector(menuItemAnnotationClick_Print), target: self)!
+        let menuItem = NSMenuItem(title: NSLocalizedString("Print", comment: ""), action: #selector(menuItemAnnotationClick_Print), keyEquivalent: "p")
         return menuItem
     }
     

+ 4 - 0
PDF Office/PDF Office/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift

@@ -70,6 +70,7 @@ extension KMMainViewController {
                 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 {
@@ -102,6 +103,9 @@ extension KMMainViewController {
     
     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

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

@@ -754,6 +754,8 @@ import Cocoa
         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
 
         DispatchQueue.main.async {