Browse Source

【2025】【综合】UI问题修正

niehaoyu 4 months ago
parent
commit
9105d20bf8

+ 1 - 1
PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeQuickToolsView/KMHomeQuickToolsView.swift

@@ -80,7 +80,7 @@ public class KMHomeQuickToolsView: BaseXibView {
         
         
         titleLabel.stringValue = KMLocalizedString("Advanced Editing Tools")
         titleLabel.stringValue = KMLocalizedString("Advanced Editing Tools")
         titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
         titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
-        titleLabel.font = ComponentLibrary.shared.font(forToken: "mac/body-l-bold")
+        titleLabel.font = ComponentLibrary.shared.font(forToken: "mac/body-m-bold")
         
         
         moreButton.properties = ComponentButtonProperty(type: .text_gray,
         moreButton.properties = ComponentButtonProperty(type: .text_gray,
                                                         size: .xxs,
                                                         size: .xxs,

+ 1 - 5
PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeRightView/HeaderFooterView/KMHomeFilesHeaderView.swift

@@ -95,11 +95,7 @@ public class KMHomeFilesHeaderView: BaseXibView {
     }
     }
     
     
     func updateDeleteButtonState() {
     func updateDeleteButtonState() {
-        if HistoryFilesManager.manager.selectFiles.count > 0 {
-            deleteButton.properties.isDisabled = false
-        } else {
-            deleteButton.properties.isDisabled = true
-        }
+        deleteButton.properties.isDisabled = false
         deleteButton.reloadData()
         deleteButton.reloadData()
     }
     }
     
     

+ 9 - 9
PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeRightView/HistoryFilesItems/KMHistoryFileListItem.xib

@@ -37,13 +37,12 @@
                                 </constraints>
                                 </constraints>
                                 <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="test" id="0a9-Rx-feb"/>
                                 <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="test" id="0a9-Rx-feb"/>
                             </imageView>
                             </imageView>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zKu-lm-fyn">
-                                <rect key="frame" x="70" y="24" width="249" height="16"/>
+                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NTN-kq-Yvv">
+                                <rect key="frame" x="531" y="24" width="84" height="16"/>
                                 <constraints>
                                 <constraints>
-                                    <constraint firstAttribute="height" relation="lessThanOrEqual" constant="40" id="2fQ-an-Qkg"/>
-                                    <constraint firstAttribute="width" relation="lessThanOrEqual" constant="536" id="dDV-7O-phh"/>
+                                    <constraint firstAttribute="width" constant="80" id="cKm-AT-sGq"/>
                                 </constraints>
                                 </constraints>
-                                <textFieldCell key="cell" title="--" id="70S-Wn-1Cy">
+                                <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="0Bl-Ug-WTf">
                                     <font key="font" metaFont="system"/>
                                     <font key="font" metaFont="system"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -60,12 +59,13 @@
                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                 </textFieldCell>
                                 </textFieldCell>
                             </textField>
                             </textField>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NTN-kq-Yvv">
-                                <rect key="frame" x="531" y="24" width="84" height="16"/>
+                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zKu-lm-fyn">
+                                <rect key="frame" x="70" y="24" width="249" height="16"/>
                                 <constraints>
                                 <constraints>
-                                    <constraint firstAttribute="width" constant="80" id="cKm-AT-sGq"/>
+                                    <constraint firstAttribute="height" relation="lessThanOrEqual" constant="40" id="2fQ-an-Qkg"/>
+                                    <constraint firstAttribute="width" relation="lessThanOrEqual" constant="536" id="dDV-7O-phh"/>
                                 </constraints>
                                 </constraints>
-                                <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="0Bl-Ug-WTf">
+                                <textFieldCell key="cell" title="--" id="70S-Wn-1Cy">
                                     <font key="font" metaFont="system"/>
                                     <font key="font" metaFont="system"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>

+ 23 - 15
PDF Office/PDF Master/KMClass/KMHomeViewController/Views/KMHomeRightView/KMHomeRightView.swift

@@ -419,26 +419,34 @@ extension KMHomeRightView: KMHomeFilesHeaderViewDelegate {
         }
         }
         let alert = NSAlert()
         let alert = NSAlert()
         alert.alertStyle = .informational
         alert.alertStyle = .informational
-        alert.informativeText = KMLocalizedString("Remove Selected Files from your Recent Files?")
+        if HistoryFilesManager.manager.selectFiles.count > 0 {
+            alert.informativeText = KMLocalizedString("Remove Selected Files from your Recent Files?")
+        } else {
+            alert.informativeText = KMLocalizedString("Remove Files from your Recent Files?")
+        }
         alert.messageText = KMLocalizedString("The file will disappear from the recent list.")
         alert.messageText = KMLocalizedString("The file will disappear from the recent list.")
         alert.addButton(withTitle: KMLocalizedString("Delete"))
         alert.addButton(withTitle: KMLocalizedString("Delete"))
         alert.addButton(withTitle: KMLocalizedString("Cancel"))
         alert.addButton(withTitle: KMLocalizedString("Cancel"))
         alert.showsSuppressionButton = true
         alert.showsSuppressionButton = true
         let response = alert.runModal()
         let response = alert.runModal()
-        if response.rawValue == 1001 {
-//            var selects: [URL] = []
-//            if HistoryFilesManager.manager.selectFiles.count > 0 {
-//                for selecturl in HistoryFilesManager.manager.selectFiles {
-//                    selects.append(selecturl)
-//                }
-//            }
-//            HistoryFilesManager.manager.historyFileDeleteAction(selects)
-//            self.reloadData()
-//            
-//            if alert.suppressionButton?.state == .on {
-//                UserDefaults.standard.set("YES", forKey: "HomeFilesDeleteConfirmKey")
-//                UserDefaults.standard.synchronize()
-//            }
+        if response.rawValue == 1000 {
+            var selects: [URL] = []
+            if HistoryFilesManager.manager.selectFiles.count > 0 {
+                for selecturl in HistoryFilesManager.manager.selectFiles {
+                    selects.append(selecturl)
+                }
+            } else {
+                for selecturl in HistoryFilesManager.manager.files {
+                    selects.append(selecturl)
+                }
+            }
+            HistoryFilesManager.manager.historyFileDeleteAction(selects)
+            self.reloadData()
+            
+            if alert.suppressionButton?.state == .on {
+                UserDefaults.standard.set("YES", forKey: "HomeFilesDeleteConfirmKey")
+                UserDefaults.standard.synchronize()
+            }
         }
         }
         
         
     }
     }

+ 2 - 4
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -711,11 +711,9 @@ import KMComponentLibrary
             setupSplitPDFController()
             setupSplitPDFController()
             
             
             if listView.viewSplitMode == .horizontal {
             if listView.viewSplitMode == .horizontal {
-                pdfSplitView.isVertical = true
-                
-            } else if listView.viewSplitMode == .vertical {
                 pdfSplitView.isVertical = false
                 pdfSplitView.isVertical = false
-                
+            } else if listView.viewSplitMode == .vertical {
+                pdfSplitView.isVertical = true
             }
             }
         }
         }
     }
     }

BIN
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/toolbar_TTS.imageset/toolbar_TTS.pdf


+ 2 - 2
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Toolbar/toolbar_ppt.imageset/toolbar_ppt.pdf

@@ -10,7 +10,7 @@ stream
 /DeviceRGB CS
 /DeviceRGB CS
 /DeviceRGB cs
 /DeviceRGB cs
 q
 q
-1.000000 0.000000 -0.000000 1.000000 4.000000 6.500000 cm
+1.000000 0.000000 -0.000000 1.000000 0.000000 2.500000 cm
 0.062745 0.094118 0.156863 scn
 0.062745 0.094118 0.156863 scn
 0.000000 15.000000 m
 0.000000 15.000000 m
 2.187500 15.000000 l
 2.187500 15.000000 l
@@ -59,7 +59,7 @@ endobj
 4 0 obj
 4 0 obj
   << /Annots []
   << /Annots []
      /Type /Page
      /Type /Page
-     /MediaBox [ 0.000000 0.000000 28.000000 28.000000 ]
+     /MediaBox [ 0.000000 0.000000 20.000000 20.000000 ]
      /Resources 1 0 R
      /Resources 1 0 R
      /Contents 2 0 R
      /Contents 2 0 R
      /Parent 5 0 R
      /Parent 5 0 R

+ 5 - 8
PDF Office/PDF Master/KMClass/KMPDFViewController/Toolbar/KMPDFToolbarController.swift

@@ -735,20 +735,17 @@ extension KMPDFToolbarController: ComponentSelectZoomDelegate {
     
     
     func componentSelectZoomDidSelect(view: ComponentSelectZoom?, menuItemProperty: ComponentMenuitemProperty?) {
     func componentSelectZoomDidSelect(view: ComponentSelectZoom?, menuItemProperty: ComponentMenuitemProperty?) {
         if menuItemProperty?.identifier == KMPDFToolbar_Zoom_AdapWidth_Identifier {
         if menuItemProperty?.identifier == KMPDFToolbar_Zoom_AdapWidth_Identifier {
-            if pdfView?.scaleFactor != 1.0 {
-                pdfView?.scaleFactor = 1.0
-                pdfView?.autoScales = false
-            }
-            
+            pdfView?.autoScales = true
         } else if menuItemProperty?.identifier == KMPDFToolbar_Zoom_AdapPage_Identifier {
         } else if menuItemProperty?.identifier == KMPDFToolbar_Zoom_AdapPage_Identifier {
             let pageHeight = pdfView?.currentPage()!.size.height
             let pageHeight = pdfView?.currentPage()!.size.height
             let pdfviewHeight = pdfView?.bounds.size.height
             let pdfviewHeight = pdfView?.bounds.size.height
             pdfView?.scaleFactor = pdfviewHeight!/pageHeight!
             pdfView?.scaleFactor = pdfviewHeight!/pageHeight!
             pdfView?.autoScales = false
             pdfView?.autoScales = false
-            
         } else if menuItemProperty?.identifier == KMPDFToolbar_Zoom_ActualSize_Identifier {
         } else if menuItemProperty?.identifier == KMPDFToolbar_Zoom_ActualSize_Identifier {
-            pdfView?.autoScales = true
-            
+            if pdfView?.scaleFactor != 1.0 {
+                pdfView?.scaleFactor = 1.0
+                pdfView?.autoScales = false
+            }
         } else if menuItemProperty?.identifier == KMPDFToolbar_Zoom_10_Identifier {
         } else if menuItemProperty?.identifier == KMPDFToolbar_Zoom_10_Identifier {
             pdfView?.scaleFactor = 0.1
             pdfView?.scaleFactor = 0.1
             
             

+ 24 - 39
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2148,7 +2148,7 @@
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "221"
             startingLineNumber = "221"
             endingLineNumber = "221"
             endingLineNumber = "221"
-            landmarkName = "mainWindow"
+            landmarkName = "setDocument"
             landmarkType = "24">
             landmarkType = "24">
             <Locations>
             <Locations>
                <Location
                <Location
@@ -2212,11 +2212,11 @@
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "303"
             startingLineNumber = "303"
             endingLineNumber = "303"
             endingLineNumber = "303"
-            landmarkName = "documentLoadComplete()"
+            landmarkName = "leftSidePaneIsOpen()"
             landmarkType = "7">
             landmarkType = "7">
             <Locations>
             <Locations>
                <Location
                <Location
-                  uuid = "D206E0B7-814F-4B14-B67E-A227181643C3 - c14b062c812388d"
+                  uuid = "D206E0B7-814F-4B14-B67E-A227181643C3 - c14b062c812382e"
                   shouldBeEnabled = "Yes"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
                   continueAfterRunningActions = "No"
@@ -2226,8 +2226,8 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   startingColumnNumber = "9223372036854775807"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "306"
-                  endingLineNumber = "306"
+                  startingLineNumber = "303"
+                  endingLineNumber = "303"
                   offsetFromSymbolStart = "68">
                   offsetFromSymbolStart = "68">
                </Location>
                </Location>
                <Location
                <Location
@@ -2260,11 +2260,11 @@
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "311"
             startingLineNumber = "311"
             endingLineNumber = "311"
             endingLineNumber = "311"
-            landmarkName = "leftSidePaneIsOpen()"
+            landmarkName = "toggleOpenLeftSide(pdfSideBarType:)"
             landmarkType = "7">
             landmarkType = "7">
             <Locations>
             <Locations>
                <Location
                <Location
-                  uuid = "E9CA18F4-1E31-433F-B721-D83769733F83 - 3a681dc077fd0768"
+                  uuid = "E9CA18F4-1E31-433F-B721-D83769733F83 - 3a681dc077fd07cb"
                   shouldBeEnabled = "Yes"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
                   continueAfterRunningActions = "No"
@@ -2274,8 +2274,8 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   startingColumnNumber = "9223372036854775807"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "314"
-                  endingLineNumber = "314"
+                  startingLineNumber = "311"
+                  endingLineNumber = "311"
                   offsetFromSymbolStart = "656">
                   offsetFromSymbolStart = "656">
                </Location>
                </Location>
                <Location
                <Location
@@ -2308,11 +2308,11 @@
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "330"
             startingLineNumber = "330"
             endingLineNumber = "330"
             endingLineNumber = "330"
-            landmarkName = "toggleOpenLeftSide(pdfSideBarType:)"
-            landmarkType = "7">
+            landmarkName = "KMMainViewController"
+            landmarkType = "3">
             <Locations>
             <Locations>
                <Location
                <Location
-                  uuid = "21491771-A89E-431C-A345-8F8239B11B3D - 702999c0d437ec75"
+                  uuid = "21491771-A89E-431C-A345-8F8239B11B3D - 702999c0d437ec16"
                   shouldBeEnabled = "Yes"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
                   continueAfterRunningActions = "No"
@@ -2322,8 +2322,8 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   startingColumnNumber = "9223372036854775807"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "334"
-                  endingLineNumber = "334"
+                  startingLineNumber = "331"
+                  endingLineNumber = "331"
                   offsetFromSymbolStart = "2024">
                   offsetFromSymbolStart = "2024">
                </Location>
                </Location>
                <Location
                <Location
@@ -2497,28 +2497,13 @@
             filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
             filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "827"
-            endingLineNumber = "827"
+            startingLineNumber = "825"
+            endingLineNumber = "825"
             landmarkName = "removePDFWatermark()"
             landmarkName = "removePDFWatermark()"
             landmarkType = "7">
             landmarkType = "7">
             <Locations>
             <Locations>
                <Location
                <Location
-                  uuid = "14EF9D11-330E-4DB1-A4D2-AA533CF55782 - ae5dbea256bddd06"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMMainViewController.removePDFWatermark() -&gt; ()"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "830"
-                  endingLineNumber = "830"
-                  offsetFromSymbolStart = "2248">
-               </Location>
-               <Location
-                  uuid = "14EF9D11-330E-4DB1-A4D2-AA533CF55782 - ae5dbea256bddca5"
+                  uuid = "14EF9D11-330E-4DB1-A4D2-AA533CF55782 - ae5dbea256bddce3"
                   shouldBeEnabled = "Yes"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
                   continueAfterRunningActions = "No"
@@ -2528,12 +2513,12 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   startingColumnNumber = "9223372036854775807"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "827"
-                  endingLineNumber = "827"
-                  offsetFromSymbolStart = "2368">
+                  startingLineNumber = "825"
+                  endingLineNumber = "825"
+                  offsetFromSymbolStart = "1464">
                </Location>
                </Location>
                <Location
                <Location
-                  uuid = "14EF9D11-330E-4DB1-A4D2-AA533CF55782 - ae5dbea256bddca5"
+                  uuid = "14EF9D11-330E-4DB1-A4D2-AA533CF55782 - ae5dbea256bddce3"
                   shouldBeEnabled = "Yes"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
                   continueAfterRunningActions = "No"
@@ -2543,9 +2528,9 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/KMMainViewController.swift"
                   startingColumnNumber = "9223372036854775807"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "827"
-                  endingLineNumber = "827"
-                  offsetFromSymbolStart = "2616">
+                  startingLineNumber = "825"
+                  endingLineNumber = "825"
+                  offsetFromSymbolStart = "1740">
                </Location>
                </Location>
             </Locations>
             </Locations>
          </BreakpointContent>
          </BreakpointContent>