Browse Source

【综合】分屏 选择文件界面未同步架上版本(已修复)

tangchao 11 months ago
parent
commit
193bc047ed

+ 2 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/Split/KMSecondaryViewController.h

@@ -7,9 +7,11 @@
 
 #import <Cocoa/Cocoa.h>
 
+@class KMSecondaryViewController;
 @protocol KMSecondaryViewControllerDelegate <NSObject>
 @optional
 - (void)receivedFileUrl:(NSURL *)url;
+- (void)controllerDidClose:(KMSecondaryViewController *)controller;
 
 @end
 

+ 13 - 4
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/Split/KMSecondaryViewController.m

@@ -6,6 +6,7 @@
 //
 
 #import "KMSecondaryViewController.h"
+#import <PDF_Reader_Pro-Swift.h>
 
 #define FIXED_HEIGHT 195.0
 
@@ -85,19 +86,19 @@
     [super viewDidLoad];
     
     self.view.wantsLayer = YES;
-    self.view.layer.backgroundColor = NSColor.whiteColor.CGColor;
+    self.view.layer.backgroundColor = [KMAppearance KMColor_Layout_BG_Drak].CGColor;
         
     
     [_dragOrClickButtonLabel setStringValue:NSLocalizedString(@"Drag file here to open it", nil)];
-//    _dragOrClickButtonLabel.textColor = [KMAppearance KMColor_Layout_H1];
+    _dragOrClickButtonLabel.textColor = [KMAppearance KMColor_Layout_H1];
     
     _selectFileButton.wantsLayer = YES;
     _selectFileButton.layer.cornerRadius = 4;
     _selectFileButton.layer.masksToBounds = YES;
-//    _selectFileButton.layer.backgroundColor = [KMAppearance KMColor_Interactive_M0].CGColor;
+    _selectFileButton.layer.backgroundColor = [KMAppearance KMColor_Interactive_M0].CGColor;
     _selectFileButton.layer.cornerRadius = 1.0;
     _selectFileButton.title = NSLocalizedString(@"Select File", nil);
-//    [_selectFileButton setTitleColor:[KMAppearance KMColor_Layout_W0]];
+    [_selectFileButton setTitleColor:[KMAppearance KMColor_Layout_W0]];
     
     self.secondaryView.receivedFileUrlBlock = ^(NSURL *fileUrl) {
         if ([self.delegate respondsToSelector:@selector(receivedFileUrl:)]) {
@@ -106,6 +107,14 @@
     };
 }
 
+- (IBAction)closeSecondaryPdfView:(NSButton *)sender {
+    if ([self.delegate respondsToSelector:@selector(controllerDidClose:)]) {
+        [self.delegate controllerDidClose:self];
+    }
+    
+    [[NSNotificationCenter defaultCenter] postNotificationName:@"KMSplitSinglePageNotification" object:self];
+}
+
 //Adjust NSTextField width
 - (void)changeBenefitOfContrastLabelWidth:(CGFloat)widthFloat {
     _benefitOfContrastLabel_WidthLayout.constant = widthFloat;

+ 6 - 6
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/Split/KMSecondaryViewController.xib

@@ -32,7 +32,7 @@
                         <font key="font" metaFont="system"/>
                     </buttonCell>
                 </button>
-                <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wmn-eL-Rge">
+                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wmn-eL-Rge">
                     <rect key="frame" x="534" y="657.5" width="20.5" height="24"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="20" id="dGb-Vf-8wE"/>
@@ -43,7 +43,7 @@
                         <font key="font" metaFont="system"/>
                     </buttonCell>
                     <connections>
-                        <action selector="closeSecondaryPdfView:" target="-1" id="yr8-Se-sI3"/>
+                        <action selector="closeSecondaryPdfView:" target="-2" id="E5W-O6-BXq"/>
                     </connections>
                 </button>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="kTE-cG-rrO">
@@ -55,7 +55,7 @@
                                 <constraint firstAttribute="height" constant="140" id="Egz-J0-EPI"/>
                                 <constraint firstAttribute="width" constant="140" id="iaS-HP-zEF"/>
                             </constraints>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="icon_empty_add_norm" id="JlM-1S-ZXY"/>
+                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="KMImageNameSplitEmpty" id="JlM-1S-ZXY"/>
                         </imageView>
                         <button verticalHuggingPriority="750" tag="10" translatesAutoresizingMaskIntoConstraints="NO" id="lHt-h3-ZMr">
                             <rect key="frame" x="50" y="112" width="200" height="40"/>
@@ -71,7 +71,7 @@
                                 <action selector="selectFileAction:" target="-2" id="Nzx-Jm-zi4"/>
                             </connections>
                         </button>
-                        <textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0rM-Vt-X5j">
+                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0rM-Vt-X5j">
                             <rect key="frame" x="44" y="84" width="212" height="20"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="208" id="ehi-uE-V6x"/>
@@ -82,7 +82,7 @@
                                 <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                             </textFieldCell>
                         </textField>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="j6H-4w-adU">
+                        <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="j6H-4w-adU">
                             <rect key="frame" x="80" y="160" width="140" height="140"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="140" id="QdR-ZW-YA7"/>
@@ -123,6 +123,7 @@
         </customView>
     </objects>
     <resources>
+        <image name="KMImageNameSplitEmpty" width="200" height="200"/>
         <image name="NSStopProgressTemplate" width="14" height="13"/>
         <image name="buttonCell:iDk-4N-SVc:image" width="1" height="1">
             <mutableData key="keyedArchiveRepresentation">
@@ -389,6 +390,5 @@ HDwcPhxAHEIcSRxLHE0pwynIKdcp2ynmKe4p+yoIKh0qIiomKigqKiosKjUqOipAKkgqSipMKk4qUDvw
 O/U8AjwFPBI8FzwfPCI8JzwvAAAAAAAAAgEAAAAAAAAAaAAAAAAAAAAAAAAAAAAAPDI
 </mutableData>
         </image>
-        <image name="icon_empty_add_norm" width="128" height="128"/>
     </resources>
 </document>

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

@@ -3490,6 +3490,10 @@ extension KMMainViewController: KMSecondaryViewControllerDelegate {
             self.openSecondaryPdfView = nil
         }
     }
+    
+    func controllerDidClose(_ controller: KMSecondaryViewController!) {
+        self.singlePageScreen(isSinglePage: true, doublePagesScreen: false)
+    }
 }
 
 // MARK: -

+ 0 - 16
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -276,21 +276,5 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "2D1B4940-894F-483C-B9C2-5FC4866782F7"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "3500"
-            endingLineNumber = "3500"
-            landmarkName = "changeModelAction(mode:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
    </Breakpoints>
 </Bucket>