macos: workaround for TabTitleEditor alignment issue

pull/11052/head
Lukas 2026-02-27 10:21:11 +01:00
parent 32a9d35c81
commit e55ebf0008
No known key found for this signature in database
GPG Key ID: 1944A0A77B561220
1 changed files with 3 additions and 1 deletions

View File

@ -226,7 +226,9 @@ final class TabTitleEditor: NSObject, NSTextFieldDelegate {
if let sourceLabel {
let labelFrame = tabButton.convert(sourceLabel.bounds, from: sourceLabel)
frame.origin.y = labelFrame.minY
/// The `labelFrame.minY` value changes unexpectedly after the first use,
/// I don't know exactly why, but `tabButton.bounds` appears stable enough to calculate the correct position reliably.
frame.origin.y = bounds.midY - labelFrame.height * 0.5
frame.size.height = labelFrame.height
}