Browse Source

【主题色】- 主题颜色切换崩溃问题

liujiajie 11 months ago
parent
commit
bda4f653eb

+ 1 - 0
PDF Office/PDF Master/Class/PDFTools/Background/New/View/KMAddBackgroundView.swift

@@ -253,6 +253,7 @@ class KMAddBackgroundView: KMBaseXibView, NSComboBoxDelegate {
     }
     override func updateLanguage() {
         typeBox.title = NSLocalizedString("Source", comment: "")
+        self.templateNameLabel.stringValue = NSLocalizedString("Name:", comment: "")
 
         batchButton.title = NSLocalizedString("Batch", comment: "");
         cancelButton.title = NSLocalizedString("Cancel", comment: "");

+ 9 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m

@@ -398,6 +398,15 @@ NSNotificationName const KMPDFViewTableAnnotationDidChangeNotification = @"KMPDF
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
 
+- (void)updateDocumentViewForBackgroundColor{
+    
+    [self layoutDocumentView];
+//    [self setNeedsDisplayForVisiblePages];
+
+    [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:_viewMode] forKey:@"kPDFViewModeKey"];
+    [[NSUserDefaults standardUserDefaults] synchronize];
+}
+
 - (void)setViewSplitMode:(KMPDFViewSplitMode)viewSplitMode {
     if (_viewSplitMode == viewSplitMode) {
         return;

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayCustomThemesCollectionViewItem.swift

@@ -110,7 +110,7 @@ class KMPageDisplayCustomThemesCollectionViewItem: NSCollectionViewItem {
         let color = colorPanel.color.usingColorSpaceName(.calibratedRGB) ?? .clear
         
         if let callback = customItemActionCallback {
-            callback(itemCount, color, true)
+            callback(itemCount, colorPanel.color, true)
         }
     }