Browse Source

【综合】注释工具栏,工具选项大小不统一(宽度)(已修复)

tangchao 11 tháng trước cách đây
mục cha
commit
360a72bb9a

+ 5 - 3
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTypeImageView.swift

@@ -114,7 +114,7 @@ class KMNoteTypeImageView: NSImageView {
             image?.unlockFocus()
         } else if type == SKNHighlightString {
             if let baseImage = NSImage(named: highlight) {
-                var size = NSMakeSize(18, 18)
+                var size = NSMakeSize(20, 20)
                 image = NSImage(size: size)
                 image?.lockFocus()
                 if let context = NSGraphicsContext.current?.cgContext {
@@ -136,7 +136,7 @@ class KMNoteTypeImageView: NSImageView {
             }
         } else if type == SKNUnderlineString {
             if let baseImage = NSImage(named: highlight) {
-                var size = NSMakeSize(18, 18)
+                var size = NSMakeSize(20, 20)
                 image = NSImage(size: size)
                 image?.lockFocus()
                 if let context = NSGraphicsContext.current?.cgContext {
@@ -204,7 +204,9 @@ class KMNoteTypeImageView: NSImageView {
             image?.unlockFocus()
         } else if type == SKNInkString {
             if let baseImage = NSImage(named: "KMImageNameInkIcon")?.copy() as? NSImage {
-                image = NSImage(size: baseImage.size.offset(x: 1.5, y: 1.5))
+                // baseImage.size.offset(x: 1.5, y: 1.5)
+                var size = NSMakeSize(20, 20)
+                image = NSImage(size: size)
                 image?.lockFocus()
                 let ref3 = NSGraphicsContext.current?.cgContext
                 KMContextSaveGState(ref3)