diff --git a/Kit/helpers.swift b/Kit/helpers.swift index c97d2a1cc6b..6915c9c7e29 100644 --- a/Kit/helpers.swift +++ b/Kit/helpers.swift @@ -387,7 +387,7 @@ public func popupWithColorRow(_ view: NSView, color: NSColor, title: String, val colorView.wantsLayer = true colorView.layer?.backgroundColor = color.cgColor colorView.layer?.cornerRadius = 2 - let labelWidth = title.widthOfString(usingFont: .systemFont(ofSize: 13, weight: .regular)) + 5 + let labelWidth = min(180, title.widthOfString(usingFont: .systemFont(ofSize: 13, weight: .regular)) + 5) let labelView: LabelField = LabelField(frame: NSRect(x: 18, y: (22-16)/2, width: labelWidth, height: 16), title) let valueView: ValueField = ValueField(frame: NSRect(x: 18 + labelWidth, y: (22-16)/2, width: rowView.frame.width - labelWidth - 18, height: 16), value)