Ladybird/Qt: Set the tab tooltip to its full title

If a tab's title is cut off due to its size, setting a tool tip will
allow for viewing the full title.
This commit is contained in:
Timothy Flynn
2024-04-02 21:45:09 -04:00
committed by Andreas Kling
parent 2713d4651d
commit ecce4ad426

View File

@@ -644,6 +644,8 @@ void BrowserWindow::device_pixel_ratio_changed(qreal dpi)
void BrowserWindow::tab_title_changed(int index, QString const& title)
{
m_tabs_container->setTabText(index, title);
m_tabs_container->setTabToolTip(index, title);
if (m_tabs_container->currentIndex() == index)
setWindowTitle(QString("%1 - Ladybird").arg(title));
}