1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 00:47:45 +00:00

Browser+Ladybird+LibWebView: Consolidate title handling in LibWebView

Namely, let's have empty titles behave the same in both Browser and
Ladybird (display the URL).
This commit is contained in:
Timothy Flynn 2023-06-07 16:37:30 -04:00 committed by Andreas Kling
parent f2a28e83de
commit 5a3825b561
3 changed files with 13 additions and 18 deletions

View file

@ -516,15 +516,9 @@ int BrowserWindow::tab_index(Tab* tab)
void BrowserWindow::tab_title_changed(int index, QString const& title)
{
if (title.isEmpty()) {
m_tabs_container->setTabText(index, "...");
if (m_tabs_container->currentIndex() == index)
setWindowTitle("Ladybird");
} else {
m_tabs_container->setTabText(index, title);
if (m_tabs_container->currentIndex() == index)
setWindowTitle(QString("%1 - Ladybird").arg(title));
}
m_tabs_container->setTabText(index, title);
if (m_tabs_container->currentIndex() == index)
setWindowTitle(QString("%1 - Ladybird").arg(title));
}
void BrowserWindow::tab_favicon_changed(int index, QIcon icon)