fix: adjusted popup label width to better fit long translations (#2485)

This commit is contained in:
Serhiy Mytrovtsiy
2025-04-19 13:59:33 +02:00
parent 3d12edae08
commit 71c25169a0

View File

@@ -342,7 +342,7 @@ public func separatorView(_ title: String, origin: NSPoint = NSPoint(x: 0, y: 0)
public func popupRow(_ view: NSView, title: String, value: String) -> (LabelField, ValueField, NSView) {
let rowView: NSView = NSView(frame: NSRect(x: 0, y: 0, width: view.frame.width, height: 22))
let labelWidth = title.widthOfString(usingFont: .systemFont(ofSize: 13, weight: .regular)) + 4
let labelWidth = title.widthOfString(usingFont: .systemFont(ofSize: 12, weight: .regular)) + 4
let labelView: LabelField = LabelField(frame: NSRect(x: 0, y: (22-16)/2, width: labelWidth, height: 16), title)
let valueView: ValueField = ValueField(frame: NSRect(x: labelWidth, y: (22-16)/2, width: rowView.frame.width - labelWidth, height: 16), value)