Browse Source

【综合】链接按钮完善

niehaoyu 1 year ago
parent
commit
037e39122a

+ 17 - 33
PDF Office/PDF Master.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -17,39 +17,23 @@
             startingLineNumber = "709"
             endingLineNumber = "709"
             landmarkName = "loadOpenFileFunctionGuide(_:)"
-            landmarkType = "9">
-            <Locations>
-               <Location
-                  uuid = "4866007A-0701-444E-AFC7-C571286D5EE8 - c7c9950d5bad954"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Master.KMMainViewController.loadOpenFileFunctionGuide(PDF_Master.KMGuideInfoType) -&gt; ()"
-                  moduleName = "PDF Master"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "709"
-                  endingLineNumber = "709"
-                  offsetFromSymbolStart = "4236">
-               </Location>
-               <Location
-                  uuid = "4866007A-0701-444E-AFC7-C571286D5EE8 - c7c9950d5bad954"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Master.KMMainViewController.loadOpenFileFunctionGuide(PDF_Master.KMGuideInfoType) -&gt; ()"
-                  moduleName = "PDF Master"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "709"
-                  endingLineNumber = "709"
-                  offsetFromSymbolStart = "3836">
-               </Location>
-            </Locations>
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "58215A11-E067-4E21-81D8-26BD345FE5C5"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/GuideInfo/Controllers/OpenFileGuide/KMOpenFileGuidePanel.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "130"
+            endingLineNumber = "130"
+            landmarkName = "updateViewColor()"
+            landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
    </Breakpoints>

+ 8 - 8
PDF Office/PDF Master/Class/Home/View/KMTextImageButtonVC.xib

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMTextImageButtonVC" customModule="PDF_Office" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMTextImageButtonVC" customModule="PDF_Master" customModuleProvider="target">
             <connections>
                 <outlet property="button" destination="tCk-Ku-sC5" id="PsB-9F-1lw"/>
                 <outlet property="downImageHeight" destination="5Vl-xA-oRs" id="Jyu-S1-R9O"/>
@@ -47,7 +47,7 @@
             <rect key="frame" x="0.0" y="0.0" width="412" height="2"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
-                <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="da6-bd-5im" customClass="KMMoveBox" customModule="PDF_Office" customModuleProvider="target">
+                <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="da6-bd-5im" customClass="KMMoveBox" customModule="PDF_Master" customModuleProvider="target">
                     <rect key="frame" x="0.0" y="0.0" width="412" height="2"/>
                     <view key="contentView" id="WYb-wk-Kom">
                         <rect key="frame" x="1" y="1" width="410" height="0.0"/>
@@ -86,7 +86,7 @@
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="btn_radio_sel_on" id="oA5-bv-d5K"/>
                 </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="CR8-Q6-Dno">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="CR8-Q6-Dno">
                     <rect key="frame" x="141" y="44" width="37" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="G81-72-BDW">
                         <font key="font" metaFont="system"/>
@@ -115,7 +115,7 @@
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="btn_radio_sel_on" id="kdo-to-2E6"/>
                 </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tue-63-i77">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tue-63-i77">
                     <rect key="frame" x="42" y="27" width="37" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="k7p-Sh-Sol">
                         <font key="font" metaFont="system"/>
@@ -144,7 +144,7 @@
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="btn_radio_sel_on" id="JjX-sa-CUf"/>
                 </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Gmv-bN-fqQ">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Gmv-bN-fqQ">
                     <rect key="frame" x="141" y="16" width="37" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="4M7-ed-OxF">
                         <font key="font" metaFont="system"/>
@@ -173,7 +173,7 @@
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="btn_radio_sel_on" id="LEx-t8-Fmm"/>
                 </imageView>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aon-Hb-VQ3">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aon-Hb-VQ3">
                     <rect key="frame" x="14" y="28" width="37" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="oqa-WW-5on">
                         <font key="font" metaFont="system"/>

+ 2 - 2
PDF Office/PDF Master/Class/PDFTools/Tools/KMTextfieldButton/KMTextfieldButton.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22154"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>

+ 10 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/View/HyperLinkButton.swift

@@ -15,7 +15,16 @@ import Cocoa
         // Drawing code here.
     }
     
-
+    override class func awakeFromNib() {
+        super.awakeFromNib()
+        
+    }
+    
+    override var title: String {
+        didSet {
+            self.attributedTitle = self.hyperlink()!
+        }
+    }
     
     func hyperlink() -> NSAttributedString? {
         var str = NSMutableAttributedString.init(attributedString: self.attributedTitle)

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

@@ -368,9 +368,7 @@ import Cocoa
         KMResourceDownloadManager.manager.checkDocumentAIVersion()
         #endif
          
-        if self.view.window != nil {
-            self.loadFunctionGuide()
-        }
+        self.loadFunctionGuide()
  
         
     }
@@ -642,7 +640,9 @@ import Cocoa
     func loadFunctionGuide() -> Void {
 
         DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) {
-            self.loadOpenFileFunctionGuide(.openFileNormal)
+            if self.view.window != nil {
+                self.loadOpenFileFunctionGuide(.openFileNormal)
+            }
         }
     }