ソースを参照

综合 - 字符对照报告显示效果优化;

zhudongyong 1 年間 前
コミット
549408345b

BIN
KdanAutoTest/KdanAuto.xcodeproj/project.xcworkspace/xcuserdata/zhudongyong.xcuserdatad/UserInterfaceState.xcuserstate


+ 2 - 2
KdanAutoTest/KdanAuto/Base.lproj/Main.storyboard

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
+<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
     <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>
     <scenes>

+ 5 - 3
KdanAutoTest/KdanAuto/Class/CompareViewController/StringCompareView/StringCompareCellView.swift

@@ -39,6 +39,9 @@ class StringCompareCellView : NSTableCellView {
     override func awakeFromNib() {
         _sepLine.wantsLayer = true;
         _sepLine.layer?.backgroundColor = NSColor.lightGray.cgColor
+        
+        m_textScrollView.hasVerticalScroller = false
+        m_textScrollView.horizontalScrollElasticity = .none
     }
     
     // Setter & Getter
@@ -106,7 +109,7 @@ extension StringCompareCellView {
         var documentAttributes:NSDictionary!
         let attString = NSAttributedString.init(rtf: checkData, documentAttributes: &documentAttributes)
         
-        var retSize = attString!.boundingRect(with: CGSizeMake(990, 1000),
+        var retSize = attString!.boundingRect(with: CGSizeMake(990, CGFLOAT_MAX),
                                                                   options: .usesLineFragmentOrigin.union(.usesFontLeading)).size
         
         return retSize.height + 50
@@ -118,10 +121,9 @@ extension StringCompareCellView {
 class CustomScrollView: NSScrollView {
     
     override func scroll(_ point: NSPoint) {
-        
     }
     
     override func scrollWheel(with event: NSEvent) {
-        // Do nothing, effectively disabling scrolling
+        self.nextResponder?.scrollWheel(with: event);
     }
 }

+ 3 - 3
KdanAutoTest/KdanAuto/Class/CompareViewController/StringCompareView/StringCompareCellView.xib

@@ -1,8 +1,8 @@
 <?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>
@@ -26,7 +26,7 @@
                     <rect key="frame" x="5" y="5" width="990" height="767"/>
                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     <subviews>
-                        <scrollView focusRingType="none" fixedFrame="YES" borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" id="Lxj-Lu-JTX" customClass="CustomScrollView">
+                        <scrollView focusRingType="none" borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" id="Lxj-Lu-JTX" customClass="CustomScrollView" customModule="KdanAuto" customModuleProvider="target">
                             <rect key="frame" x="0.0" y="0.0" width="990" height="767"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <clipView key="contentView" drawsBackground="NO" id="C3h-63-7lm">

+ 2 - 2
KdanAutoTest/KdanAuto/Class/CompareViewController/StringCompareView/StringCompareViewController.xib

@@ -1,8 +1,8 @@
 <?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>