Forráskód Böngészése

【转档-图片转PDF】空状态中的添加icon,悬浮状态不对 修复

lizhe 1 éve
szülő
commit
1d21b87276

+ 5 - 6
PDF Office/PDF Master/Class/PDFTools/ImageToPDF/View/KMBatchProcessingView/KMBatchProcessingView.xib

@@ -1,12 +1,11 @@
 <?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="21701" 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="21701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMBatchProcessingView" customModule="PDF_Office" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMBatchProcessingView" customModule="PDF_Master" customModuleProvider="target">
             <connections>
                 <outlet property="addBox" destination="CFL-oP-esw" id="EUt-9H-7zF"/>
                 <outlet property="cleanButton" destination="ZW9-hb-VaF" id="5kP-QY-Dep"/>
@@ -24,10 +23,10 @@
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="GnF-d1-s3v">
                     <rect key="frame" x="0.0" y="52" width="632" height="576"/>
                     <subviews>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="OMY-wn-4ox" customClass="KMBatchProcessingTableView" customModule="PDF_Office" customModuleProvider="target">
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="OMY-wn-4ox" customClass="KMBatchProcessingTableView" customModule="PDF_Master" customModuleProvider="target">
                             <rect key="frame" x="0.0" y="0.0" width="632" height="576"/>
                         </customView>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Btb-75-0Y1" customClass="KMBatchSelectedFilesView" customModule="PDF_Office" customModuleProvider="target">
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Btb-75-0Y1" customClass="KMBatchSelectedFilesView" customModule="PDF_Master" customModuleProvider="target">
                             <rect key="frame" x="0.0" y="0.0" width="632" height="576"/>
                         </customView>
                     </subviews>

+ 9 - 0
PDF Office/PDF Master/Class/PDFTools/ImageToPDF/View/KMBatchProcessingView/SelectedFiles/KMBatchSelectedFilesView.swift

@@ -13,6 +13,7 @@ class KMBatchSelectedFilesView: KMBaseXibView {
     @IBOutlet weak var imageButton: NSButton!
     @IBOutlet weak var titleLabel: NSTextField!
     @IBOutlet weak var subtitleLabel: NSTextField!
+    @IBOutlet weak var box: KMBox!
     
     var inputType: DataNavigationViewButtonActionType?
     var data: [URL] = []
@@ -37,6 +38,14 @@ class KMBatchSelectedFilesView: KMBaseXibView {
         self.subtitleLabel.textColor = NSColor.init(hex: "#94989C")
         self.subtitleLabel.font = NSFont.SFProTextRegular(12.0)
         self.subtitleLabel.stringValue = NSLocalizedString("Drop files here or Click Add Files at bottom left button.", comment: "")
+        
+        self.box.moveCallback = { [unowned self] mouseEntered, mouseBox in
+            if mouseEntered {
+                self.imageButton.image = NSImage(named: "icon_empty_add_hov")
+            } else {
+                self.imageButton.image = NSImage(named: "icon_empty_add_norm")
+            }
+        }
     }
 }
 

+ 18 - 4
PDF Office/PDF Master/Class/PDFTools/ImageToPDF/View/KMBatchProcessingView/SelectedFiles/KMBatchSelectedFilesView.xib

@@ -1,13 +1,13 @@
 <?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="21701" 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="21701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMBatchSelectedFilesView" customModule="PDF_Office" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMBatchSelectedFilesView" customModule="PDF_Master" customModuleProvider="target">
             <connections>
+                <outlet property="box" destination="y5i-wB-Qel" id="ZZN-sE-YKB"/>
                 <outlet property="imageButton" destination="STJ-AT-hZ8" id="zQz-NR-i0B"/>
                 <outlet property="subtitleLabel" destination="zH4-UK-9qG" id="B6o-JS-9vD"/>
                 <outlet property="titleLabel" destination="sAL-Vd-XZZ" id="tMW-xI-LeS"/>
@@ -22,6 +22,17 @@
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="Ibq-pW-6fR">
                     <rect key="frame" x="62" y="136" width="418" height="200"/>
                     <subviews>
+                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="y5i-wB-Qel" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
+                            <rect key="frame" x="145" y="72" width="128" height="128"/>
+                            <view key="contentView" id="aGb-yq-zUB">
+                                <rect key="frame" x="0.0" y="0.0" width="128" height="128"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            </view>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="128" id="1ea-VG-Qef"/>
+                                <constraint firstAttribute="width" constant="128" id="vNq-f1-LJQ"/>
+                            </constraints>
+                        </box>
                         <button translatesAutoresizingMaskIntoConstraints="NO" id="STJ-AT-hZ8">
                             <rect key="frame" x="145" y="72" width="128" height="128"/>
                             <constraints>
@@ -65,10 +76,13 @@
                         <constraint firstItem="sAL-Vd-XZZ" firstAttribute="centerX" secondItem="Ibq-pW-6fR" secondAttribute="centerX" id="9Y7-jS-EwI"/>
                         <constraint firstItem="zH4-UK-9qG" firstAttribute="centerX" secondItem="Ibq-pW-6fR" secondAttribute="centerX" id="G28-DZ-VIh"/>
                         <constraint firstItem="STJ-AT-hZ8" firstAttribute="top" secondItem="Ibq-pW-6fR" secondAttribute="top" id="HWS-Fs-hwa"/>
+                        <constraint firstItem="y5i-wB-Qel" firstAttribute="centerX" secondItem="Ibq-pW-6fR" secondAttribute="centerX" id="Mjf-JJ-wUX"/>
                         <constraint firstItem="STJ-AT-hZ8" firstAttribute="centerX" secondItem="Ibq-pW-6fR" secondAttribute="centerX" id="XRB-UH-BSM"/>
                         <constraint firstAttribute="height" constant="200" id="dRa-O2-ZIE"/>
                         <constraint firstAttribute="width" constant="418" id="jX2-q2-wWm"/>
+                        <constraint firstItem="sAL-Vd-XZZ" firstAttribute="top" secondItem="y5i-wB-Qel" secondAttribute="bottom" constant="8" id="jnU-i7-WuC"/>
                         <constraint firstItem="sAL-Vd-XZZ" firstAttribute="top" secondItem="STJ-AT-hZ8" secondAttribute="bottom" constant="8" id="lzf-9u-xTI"/>
+                        <constraint firstItem="y5i-wB-Qel" firstAttribute="top" secondItem="Ibq-pW-6fR" secondAttribute="top" id="sev-fp-PCp"/>
                         <constraint firstItem="zH4-UK-9qG" firstAttribute="top" secondItem="sAL-Vd-XZZ" secondAttribute="bottom" constant="2" id="zHD-xY-uIQ"/>
                     </constraints>
                 </customView>

+ 3 - 4
PDF Office/PDF Master/Class/PDFTools/ImageToPDF/View/KMBatchProcessingView/Tableview/KMBatchProcessingTableView.xib

@@ -1,12 +1,11 @@
 <?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="21701" 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="21701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMBatchProcessingTableView" customModule="PDF_Office" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMBatchProcessingTableView" customModule="PDF_Master" customModuleProvider="target">
             <connections>
                 <outlet property="contentView" destination="c22-O7-iKe" id="B0n-CN-hq3"/>
                 <outlet property="tableView" destination="iF7-ag-gLW" id="zPn-P7-7Gb"/>