From 3034f566eeb5c2c29cdadc427bc9737ac8066937 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Wed, 12 Jul 2023 20:23:21 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=E6=96=87=E5=AD=97=E9=AB=98=E5=BA=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mac/Base.lproj/Main.storyboard | 4 ++-- Mac/View/SearchTextField.swift | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Mac/Base.lproj/Main.storyboard b/Mac/Base.lproj/Main.storyboard index 0aaab85a..5c630372 100644 --- a/Mac/Base.lproj/Main.storyboard +++ b/Mac/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + diff --git a/Mac/View/SearchTextField.swift b/Mac/View/SearchTextField.swift index aa8bf950..7ea96db8 100644 --- a/Mac/View/SearchTextField.swift +++ b/Mac/View/SearchTextField.swift @@ -18,6 +18,14 @@ class SearchTextField: NSSearchField, NSSearchFieldDelegate { private var trackingArea: NSTrackingArea? + + override func rectForSearchText(whenCentered isCentered: Bool) -> NSRect { + var rect = super.rectForSearchText(whenCentered: isCentered) + rect.origin.y += 1.0 + rect.size.height += 2.0 + return rect + } + override func updateTrackingAreas() { if let trackingArea = trackingArea { removeTrackingArea(trackingArea)