From a21551dc1379333bda7d7c04fa7e6ea3daad8dc8 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 15 Aug 2022 17:56:10 +0800 Subject: [PATCH 1/2] IMKCandidates // Remove useless setCandidateData(). --- .../Modules/UIModules/CandidateUI/ctlCandidateIMK.swift | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Source/Modules/UIModules/CandidateUI/ctlCandidateIMK.swift b/Source/Modules/UIModules/CandidateUI/ctlCandidateIMK.swift index 72c4fadb..a867229b 100644 --- a/Source/Modules/UIModules/CandidateUI/ctlCandidateIMK.swift +++ b/Source/Modules/UIModules/CandidateUI/ctlCandidateIMK.swift @@ -83,12 +83,9 @@ public class ctlCandidateIMK: IMKCandidates, ctlCandidateProtocol { } public func reloadData() { - guard let delegate = delegate else { return } - let candidates = delegate.candidatesForController(self).map { theCandidate -> String in - let theConverted = IME.kanjiConversionIfRequired(theCandidate.1) - return (theCandidate.1 == theConverted) ? theCandidate.1 : "\(theConverted)(\(theCandidate.1))" - } - setCandidateData(candidates) + // guard let delegate = delegate else { return } // 下文無效,所以這句沒用。 + // 既然下述函式無效,那中間這段沒用的也都砍了。 + // setCandidateData(candidates) // 該函式無效。 keyCount = selectionKeys().count selectedCandidateIndex = 0 update() From 5c21d96caf33936d0e22ff30e53f5fb90c383ed5 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 15 Aug 2022 20:49:55 +0800 Subject: [PATCH 2/2] ctlCandUniv // Fix a UI rendering glitch. --- .../Modules/UIModules/CandidateUI/ctlCandidateUniversal.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Modules/UIModules/CandidateUI/ctlCandidateUniversal.swift b/Source/Modules/UIModules/CandidateUI/ctlCandidateUniversal.swift index 760f2136..e25ada9d 100644 --- a/Source/Modules/UIModules/CandidateUI/ctlCandidateUniversal.swift +++ b/Source/Modules/UIModules/CandidateUI/ctlCandidateUniversal.swift @@ -88,8 +88,8 @@ private class vwrCandidateUniversal: NSView { calculatedWindowWidth = rctCandidate.size.width + cellPadding * 2 } case false: - if cellWidth < cellHeight * 1.35 { - cellWidth = cellHeight * 1.35 + if cellWidth < cellHeight * 1.4 { + cellWidth = cellHeight * 1.4 } } newWidths.append(round(cellWidth))