14.29: the blank start tab stays put; Untitled numbers stay low

This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 15:52:24 -04:00
1 parent 1e647a9b74
commit 10f51cdf72
9 files changed
+123 -26

No files matched your search

+5 -2
View File
@@ -86,8 +86,11 @@ void ProjectTabButton::synchronize()
const QFontMetrics metrics(tabFont(active));
m_select->setText(dot + metrics.elidedText(tab->title(), Qt::ElideRight, label - (modified ? 10 : 0)));
m_select->setFont(tabFont(active));
// Swift's trailing 8 inside; a character dot outgrows Swift's 10.
m_select->setFixedWidth(label + 8 + (modified ? metrics.horizontalAdvance(dot) - 10 : 0));
// Trailing 8, or 11 closed up; a dot outgrows 10.
const bool closable = m_workspace.canClose(*tab);
m_select->setFixedWidth(label + (closable ? 8 : 11) + (modified ? metrics.horizontalAdvance(dot) - 10 : 0));
layout()->setContentsMargins(11, 0, closable ? 5 : 0, 0);
m_close->setVisible(closable);
m_select->setToolTip(tab->title());
m_select->setEnabled(m_workspace.canSwitch() || active);
m_close->setToolTip(QStringLiteral("Close %1").arg(tab->title()));