1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:58:11 +00:00

Ladybird: Add Favicon to the window

This commit is contained in:
Keir Davis 2022-07-05 05:53:11 +01:00 committed by Andrew Kaster
parent 47d7f1efec
commit 95e3e06a1e
4 changed files with 14 additions and 1 deletions

View file

@ -19,6 +19,7 @@ BrowserWindow::BrowserWindow()
QObject::connect(m_view, &WebView::loadStarted, m_location_edit, &QLineEdit::setText);
QObject::connect(m_location_edit, &QLineEdit::returnPressed, this, &BrowserWindow::location_edit_return_pressed);
QObject::connect(m_view, &WebView::title_changed, this, &BrowserWindow::page_title_changed);
QObject::connect(m_view, &WebView::favicon_changed, this, &BrowserWindow::page_favicon_changed);
}
void BrowserWindow::location_edit_return_pressed()
@ -33,3 +34,8 @@ void BrowserWindow::page_title_changed(QString title)
else
setWindowTitle(QString("%1 - Ladybird").arg(title));
}
void BrowserWindow::page_favicon_changed(QIcon icon)
{
setWindowIcon(icon);
}