Voltaire // Round windowWidth in ctlCandidateHorizontal.

This commit is contained in:
ShikiSuen 2022-05-29 15:19:30 +08:00
parent 7823ba2af7
commit 9ad145df35
1 changed files with 2 additions and 3 deletions

View File

@ -52,8 +52,7 @@ private class HorizontalCandidateView: NSView {
var result = NSSize.zero
if !elementWidths.isEmpty {
result.width = elementWidths.reduce(0, +)
result.width += CGFloat(elementWidths.count)
result.width = elementWidths.reduce(0, +) + CGFloat(elementWidths.count)
result.height = candidateTextHeight + cellPadding
}
return result
@ -78,7 +77,7 @@ private class HorizontalCandidateView: NSView {
if cellWidth < cellHeight * 1.35 {
cellWidth = cellHeight * 1.35
}
newWidths.append(cellWidth)
newWidths.append(round(cellWidth))
}
elementWidths = newWidths
}