Browse Source

【综合】整理代码

tangchao 1 year ago
parent
commit
b78f3e23b0

+ 2 - 1
PDF Office/PDF Master/Class/GuideInfo/Controllers/KMFunctionGuideMultiController.swift

@@ -74,7 +74,8 @@ class KMFunctionGuideMultiController: NSViewController {
         self.desSubLabel.font = NSFont.SFProTextRegularFont(14)
         
         self.getStartButton.wantsLayer = true
-        self.getStartButton.mouseMoveCallback = { [weak self] mouseEntered in            if KMAppearance.isDarkMode() {
+        self.getStartButton.mouseMoveCallback = { [weak self] mouseEntered in
+            if KMAppearance.isDarkMode() {
                 if mouseEntered {
                     self?.getStartButton.layer?.backgroundColor = NSColor.white.withAlphaComponent(0.2).cgColor
                 } else {

+ 2 - 2
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.swift

@@ -859,10 +859,10 @@ extension KMHomeViewController {
     //MARK: - 引导
     func loadFunctionGuide() -> Void {
         self.loadNewUserGuide()
-
     }
     
-    //MARK: what's New
+    // MARK: - what's New
+    
     func loadNewUserGuide() -> Void {
         if KMFunctionGuideWindowController.availableShow(.functionMultiAIGuide) {
             let guideWindowVC = KMFunctionGuideWindowController.init(windowNibName: "KMFunctionGuideWindowController")

+ 3 - 5
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -787,8 +787,6 @@ class KMLeftSideViewController: KMSideViewController {
 
     
     @IBAction func thumbnailSizeScaling(_ sender: NSButton) {
-        let sud = UserDefaults.standard
-        
         let tag = sender.tag
         if (tag == 0 || tag == 1) {
             var scaling = KMDataManager.ud_float(forKey: Self.Key.thumbSizeScaling)
@@ -797,9 +795,9 @@ class KMLeftSideViewController: KMSideViewController {
             }
             if (tag == 0) { // Zoom In
                 scaling += self.scalingIncrement
-                if scaling >= 2.2 {
-                    return
-                }
+//                if scaling >= 2.2 {
+//                    return
+//                }
             } else if (tag == 1) { // Zoom Out
                 scaling -= self.scalingIncrement
                 if scaling <= 0.4 {

+ 0 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMThumbnailTableviewCell.swift

@@ -63,7 +63,6 @@ class KMThumbnailTableviewCell: NSTableCellView {
         let width = NSWidth(self.bounds)
         let height = NSHeight(self.bounds)
         
-        let flodSize: CGFloat = 28
         let border: CGFloat = 10
         var bounds: NSRect = NSZeroRect
         bounds = self.pageView.page?.bounds ?? .zero

+ 2 - 4
PDF Office/PDF Master/Class/Preference/Tools/KMPreferenceManager.swift

@@ -1767,10 +1767,8 @@ extension KMPreferenceManager {
     public func initDataForAppLaunch() {
 //        KMPreferenceManager.shared.author = NSFullUserName()
         if (KMPreferenceManager.shared.autoSave) {
-            Task { @MainActor in
-                if await KMLightMemberManager.manager.canPayFunction() == false {
-                    KMPreferenceManager.shared.autoSave = false
-                }
+            if KMLightMemberManager.manager.canPayFunction() == false {
+                KMPreferenceManager.shared.autoSave = false
             }
         }
     }

+ 3 - 12
PDF Office/PDF Master/Class/README.md

@@ -38,6 +38,9 @@
 * 分割视图 KMSecondaryViewController
 * 入口 toggleSplitPDF
 
+## What's New
+* KMFunctionGuideWindowController
+
 ## xxx
 
 [sign in](https://www.baidu.com) the [dashboard](https://www.baidu.com). to [sign up](https://www.baidu.com) 
@@ -46,23 +49,11 @@
 
 - the **API ** 
 
-
-
-
-
-
-
-## xxx
-
-
 ## xxx
 
 See ***"Samples"*** folder in this folder.
 
-
-
 ## xxx
-
 * 
 *