Prechádzať zdrojové kódy

【综合】细节问题修正

niehaoyu 8 mesiacov pred
rodič
commit
2647112d85

+ 8 - 0
PDF Office/PDF Master/Class/PDFTools/CustomStamp/CustomStampWindowController.swift

@@ -54,6 +54,14 @@ class CustomStampWindowController: NSWindowController, CPDFViewDelegate, CPDFLis
         
     }
     
+    func reloadData() {
+        self.topToolbar.reloadData()
+        self.leftToolbar.reloadData()
+        self.rightToolbar.reloadData()
+    }
+    
+    
+    
     func configPDFContendView() {
         
         self.pdfContendView.wantsLayer = true

+ 17 - 3
PDF Office/PDF Master/Class/PDFTools/CustomStamp/Views/CustomStampTopToolbar.swift

@@ -49,8 +49,7 @@ class CustomStampTopToolbar: NSView, NibLoadable {
         self.colorChooseView.autoresizingMask = [.width, .height]
         self.colorChooseView.customColor = NSColor.white
         self.colorChooseView.clickHandle = {[weak self] view, color in
-            self?.pdfView.backgroundColor = color
-            
+            self?.pdfView.setPageBackgroundColorWith(color, viewMode: .other)
         }
         
         self.colorBGView.addSubview(self.colorChooseView)
@@ -64,7 +63,22 @@ class CustomStampTopToolbar: NSView, NibLoadable {
             return
         }
         
-        self.colorChooseView.customColor = pdflistView.backgroundColor
+        if pdflistView.displayModeCustomColor != nil {
+            self.colorChooseView.customColor = pdflistView.displayModeCustomColor
+        } else {
+            if (pdflistView.viewMode == .normal) {
+                self.colorChooseView.customColor = NSColor(red: 255/255, green: 255/255, blue: 255/255, alpha: 1)
+            } else if (pdflistView.viewMode == .soft) {
+                self.colorChooseView.customColor = NSColor(red: 245/255, green: 237/255, blue: 209/255, alpha: 1)
+            } else if (pdflistView.viewMode == .night) {
+                self.colorChooseView.customColor = NSColor(red: 0, green: 0, blue: 0, alpha: 1)
+            } else if (pdflistView.viewMode == .green) {
+                self.colorChooseView.customColor = NSColor(red: 205/255, green: 233/255, blue: 207/255, alpha: 1)
+            } else {
+                self.colorChooseView.customColor = pdflistView.displayModeCustomColor
+            }
+        }
+        
         self.zoomTextField.stringValue = String(format: "%.2f%@", pdflistView.scaleFactor * 100, "%")
         
         

+ 22 - 15
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m

@@ -111,19 +111,22 @@ NSNotificationName const CPDFListViewDisplayModeChangeNotification = @"CPDFListV
         NSColor *greenColor = [NSColor colorWithDeviceRed:153.0/255.0 green:207.0/255.0 blue:161.0/255.0 alpha:1.0];
         mutableArray = [NSMutableArray arrayWithArray:@[normalColor, softColor,nightColor, greenColor]];
     }
-    NSColor *pageBackgroundColor = mutableArray[viewMode];
-    if (viewMode == KMPDFViewModeOther &&
-        [[NSUserDefaults standardUserDefaults] objectForKey:@"kPDFViewModeColorKey"]) {
-        CGFloat red,green,blue,alpha;
-        NSArray *colors = [[NSUserDefaults standardUserDefaults] objectForKey:@"kPDFViewModeColorKey"];
-        red = colors.count>0 ? [colors[0] floatValue] : 0;
-        green = colors.count>1 ? [colors[1] floatValue] : 0;
-        blue = colors.count>2 ? [colors[2] floatValue] : 0;
-        alpha = colors.count>3 ? [colors[3] floatValue] : 0;
-        pageBackgroundColor = [NSColor colorWithDeviceRed:red green:green blue:blue alpha:alpha];
-    }
-    self.viewMode = viewMode;
-    [self setPageBackgroundColorWithColor:pageBackgroundColor viewMode:viewMode];
+    
+    if (mutableArray.count > viewMode) {
+        NSColor *pageBackgroundColor = mutableArray[viewMode];
+        if (viewMode == KMPDFViewModeOther &&
+            [[NSUserDefaults standardUserDefaults] objectForKey:@"kPDFViewModeColorKey"]) {
+            CGFloat red,green,blue,alpha;
+            NSArray *colors = [[NSUserDefaults standardUserDefaults] objectForKey:@"kPDFViewModeColorKey"];
+            red = colors.count>0 ? [colors[0] floatValue] : 0;
+            green = colors.count>1 ? [colors[1] floatValue] : 0;
+            blue = colors.count>2 ? [colors[2] floatValue] : 0;
+            alpha = colors.count>3 ? [colors[3] floatValue] : 0;
+            pageBackgroundColor = [NSColor colorWithDeviceRed:red green:green blue:blue alpha:alpha];
+        }
+        self.viewMode = viewMode;
+        [self setPageBackgroundColorWithColor:pageBackgroundColor viewMode:viewMode];
+    }
     
     self.activeAnnotations = [NSMutableArray array];
     self.selectAnnotations = [NSMutableArray array];
@@ -417,8 +420,12 @@ NSNotificationName const CPDFListViewDisplayModeChangeNotification = @"CPDFListV
     [self layoutDocumentView];
     [self setNeedsDisplayForVisiblePages];
 
-    [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:viewMode] forKey:@"kPDFViewModeKey"];
-    [[NSUserDefaults standardUserDefaults] synchronize];
+    if ([self.isCustomStampType isEqualToString: @"1"]) {
+        
+    } else {
+        [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:viewMode] forKey:@"kPDFViewModeKey"];
+        [[NSUserDefaults standardUserDefaults] synchronize];
+    }
 }
 
 - (void)updateDocumentViewForBackgroundColor{

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/StampList/KMAnnotationStampViewController.swift

@@ -1092,6 +1092,7 @@ let KMPDFDynamicStampNeedAuthorKey1 = "km_pdfview_dynamic_stamp_need_author"
     @IBAction func customStampButtonAction(_ sender: NSButton) {
         let customStampWC = CustomStampWindowController.currentWC()
         customStampWC.showWindow(nil)
+        customStampWC.reloadData()
         
     }
     

+ 169 - 11
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -984,28 +984,43 @@
             filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "513"
-            endingLineNumber = "513"
+            startingLineNumber = "520"
+            endingLineNumber = "520"
             landmarkName = "-addImageAnnotation:center:isRemoveBGColor:"
             landmarkType = "7">
             <Locations>
                <Location
-                  uuid = "9002EC91-591D-4D05-A2A5-1CB28D04A79E - ccaa4267b093913e"
+                  uuid = "9002EC91-591D-4D05-A2A5-1CB28D04A79E - c8c8056b3a26dde5"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
                   symbolName = "-[CPDFListView addImageAnnotation:center:isRemoveBGColor:]"
-                  moduleName = "PDF Reader Pro"
+                  moduleName = "PDFTech Editor"
                   usesParentBreakpointCondition = "Yes"
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/PDFListView/CPDFListView.m"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "515"
-                  endingLineNumber = "515"
+                  startingLineNumber = "519"
+                  endingLineNumber = "519"
+                  offsetFromSymbolStart = "1080">
+               </Location>
+               <Location
+                  uuid = "9002EC91-591D-4D05-A2A5-1CB28D04A79E - c8c8056b3a26dde5"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[CPDFListView addImageAnnotation:center:isRemoveBGColor:]"
+                  moduleName = "PDFTech Editor"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/PDFListView/CPDFListView.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "519"
+                  endingLineNumber = "519"
                   offsetFromSymbolStart = "1044">
                </Location>
                <Location
-                  uuid = "9002EC91-591D-4D05-A2A5-1CB28D04A79E - c8c8056b3a26dd61"
+                  uuid = "9002EC91-591D-4D05-A2A5-1CB28D04A79E - c8c8056b3a26a258"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
@@ -1015,8 +1030,8 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/PDFListView/CPDFListView.m"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "515"
-                  endingLineNumber = "515"
+                  startingLineNumber = "522"
+                  endingLineNumber = "522"
                   offsetFromSymbolStart = "1044">
                </Location>
             </Locations>
@@ -1370,8 +1385,8 @@
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "1259"
             endingLineNumber = "1259"
-            landmarkName = "KMBrowserWindowController"
-            landmarkType = "21">
+            landmarkName = "menuItemClick_SettingPassword(_:)"
+            landmarkType = "7">
             <Locations>
                <Location
                   uuid = "0510918F-482F-40E5-9087-43FA35EE80FB - 54bfe10120f6ec7e"
@@ -2966,6 +2981,38 @@
             endingLineNumber = "1891"
             landmarkName = "alignButtonAction(_:)"
             landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "AB05FCB8-1389-4D83-84C5-DF3559424E46 - ffccae0dc810d881"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDFTech_Editor.KMGeneralAnnotationViewController.alignButtonAction(__C.NSButton) -&gt; ()"
+                  moduleName = "PDFTech Editor"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1891"
+                  endingLineNumber = "1891"
+                  offsetFromSymbolStart = "444">
+               </Location>
+               <Location
+                  uuid = "AB05FCB8-1389-4D83-84C5-DF3559424E46 - ffccae0dc810d881"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDFTech_Editor.KMGeneralAnnotationViewController.alignButtonAction(__C.NSButton) -&gt; ()"
+                  moduleName = "PDFTech Editor"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1891"
+                  endingLineNumber = "1891"
+                  offsetFromSymbolStart = "588">
+               </Location>
+            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
@@ -2982,6 +3029,38 @@
             endingLineNumber = "2268"
             landmarkName = "fontSizeComboBoxAction(_:)"
             landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "B06E3D28-F211-4130-9989-A2DB930798BF - d9cfeb284c0b7270"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDFTech_Editor.KMGeneralAnnotationViewController.fontSizeComboBoxAction(__C.NSComboBox) -&gt; ()"
+                  moduleName = "PDFTech Editor"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "2268"
+                  endingLineNumber = "2268"
+                  offsetFromSymbolStart = "536">
+               </Location>
+               <Location
+                  uuid = "B06E3D28-F211-4130-9989-A2DB930798BF - d9cfeb284c0b7270"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDFTech_Editor.KMGeneralAnnotationViewController.fontSizeComboBoxAction(__C.NSComboBox) -&gt; ()"
+                  moduleName = "PDFTech Editor"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "2268"
+                  endingLineNumber = "2268"
+                  offsetFromSymbolStart = "676">
+               </Location>
+            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
@@ -3061,8 +3140,87 @@
                   endingLineNumber = "2371"
                   offsetFromSymbolStart = "360">
                </Location>
+               <Location
+                  uuid = "CF6DC7F1-289B-47A5-B88B-8D2D16155CA5 - f547fa180bd89835"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "closure #1 @Sendable () -&gt; () in PDFTech_Editor.KMGeneralAnnotationViewController.annotationFontReload() -&gt; ()"
+                  moduleName = "PDFTech Editor"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "2371"
+                  endingLineNumber = "2371"
+                  offsetFromSymbolStart = "464">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C519FB17-F09D-4F14-91D8-FD58D463F531"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayPropertiesViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "670"
+            endingLineNumber = "670"
+            landmarkName = "collectionView(_:itemForRepresentedObjectAt:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D559AA9A-B36A-446D-AA86-4E6032E00318"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayPropertiesViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "699"
+            endingLineNumber = "699"
+            landmarkName = "collectionView(_:itemForRepresentedObjectAt:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "F36CEC72-27FF-496F-BA90-8DF52904DB4A"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayPropertiesViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "637"
+            endingLineNumber = "637"
+            landmarkName = "collectionView(_:itemForRepresentedObjectAt:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "57B27D24-C18B-4200-92A1-646DFF57B37A"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "437"
+            endingLineNumber = "437"
+            landmarkName = "themesColor(_:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>