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

Ladybird: Handle close event in WebContentView

This commit is contained in:
Aliaksandr Kalenik 2023-03-07 06:13:08 +03:00 committed by Linus Groh
parent cc41233be4
commit 59752807c4
3 changed files with 7 additions and 0 deletions

View file

@ -64,6 +64,10 @@ Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path)
m_toolbar->addAction(m_home_action);
m_toolbar->addWidget(m_location_edit);
QObject::connect(m_view, &WebContentView::close, [this] {
m_window->close_tab(tab_index());
});
QObject::connect(m_view, &WebContentView::link_hovered, [this](QString const& title) {
m_hover_label->setText(title);
update_hover_label();