Browse Source

【综合】代码兼容

tangchao 1 year ago
parent
commit
902a5410d4

+ 8 - 8
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayPropertiesViewController.swift

@@ -186,9 +186,9 @@ class KMPageDisplayPropertiesButton: NSButton {
         counterclockwiseRotationBox.downCallback = { [weak self] downEntered, mouseBox, event in
             guard let self = self else { return }
             if downEntered {
-                counterclockwiseRotationBox.fillColor = KMAppearance.Status.selColor()
-                counterclockwiseRotationImageView.image = NSImage(named: KMImageNameUXIconPropertybarRotateCounterclockwisePre)
-                mainController.menuItemAction_rotateLeft((Any).self)
+                self.counterclockwiseRotationBox.fillColor = KMAppearance.Status.selColor()
+                self.counterclockwiseRotationImageView.image = NSImage(named: KMImageNameUXIconPropertybarRotateCounterclockwisePre)
+                self.mainController.menuItemAction_rotateLeft((Any).self)
             } else {
                 self.counterclockwiseRotationBox.fillColor = KMAppearance.Layout.l1Color()
                 self.counterclockwiseRotationImageView.image = NSImage(named: KMImageNameUXIconPropertybarRotateCounterclockwiseNor)
@@ -205,12 +205,12 @@ class KMPageDisplayPropertiesButton: NSButton {
         clockwiseRotationBox.downCallback = { [weak self] downEntered, mouseBox, event in
             guard let self = self else { return }
             if downEntered {
-                clockwiseRotationBox.fillColor = KMAppearance.Status.selColor()
-                clockwiseRotationImageView.image = NSImage(named: KMImageNameUXIconPropertybarRotateClockwisePre)
-                mainController.menuItemAction_rotateRight((Any).self)
+                self.clockwiseRotationBox.fillColor = KMAppearance.Status.selColor()
+                self.clockwiseRotationImageView.image = NSImage(named: KMImageNameUXIconPropertybarRotateClockwisePre)
+                self.mainController.menuItemAction_rotateRight((Any).self)
             } else {
-                clockwiseRotationBox.fillColor = KMAppearance.Layout.l1Color()
-                clockwiseRotationImageView.image = NSImage(named: KMImageNameUXIconPropertybarRotateClockwiseNor)
+                self.clockwiseRotationBox.fillColor = KMAppearance.Layout.l1Color()
+                self.clockwiseRotationImageView.image = NSImage(named: KMImageNameUXIconPropertybarRotateClockwiseNor)
             }
         }
         

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayThemeCollectionViewItem.swift

@@ -73,7 +73,7 @@ class KMPageDisplayThemeCollectionViewItem: NSCollectionViewItem {
             guard let self = self else { return }
 
             if mouseEntered {
-                if itemInteger.rawValue > 3 {
+                if self.itemInteger.rawValue > 3 {
 //                    if !IAPProductsManager.defaultManager.isAvailableAllFunction {
 //                        self.closeButton.isHidden = true
 //                    } else {
@@ -81,7 +81,7 @@ class KMPageDisplayThemeCollectionViewItem: NSCollectionViewItem {
 //                    }
                 }
             } else {
-                closeButton.isHidden = true
+                self.closeButton.isHidden = true
             }
         }
     }

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideViewController.swift

@@ -343,7 +343,7 @@ class KMRightSideViewController: NSViewController,CipherTextViewDelegate {
         annotationProperties.openPropertiesType = .pageDisplay
         annotationProperties.pageDisplayReaderMode = { [weak self] isReaderMode in
             guard let self = self else { return }
-            mainController!.readMode(self)
+            self.mainController!.readMode(self)
         }
         annotationProperties.isEmptyAnnotation = false
         contextBox.contentView = self.annotationProperties.view