diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-11-08 02:00:24 +0100 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2022-12-25 07:58:58 -0700 |
commit | 982174706b754e7cd26625beeb0242da85066cd3 (patch) | |
tree | 9abc83e6a8c35f19a22b680e5a1793f8b0ff0595 /Ladybird/Tab.cpp | |
parent | ef553a4b768cb6b5a5acd0305098a2111febede6 (diff) | |
download | serenity-982174706b754e7cd26625beeb0242da85066cd3.zip |
Ladybird: Handle forward and backward mouse buttons
We now emit a new signal for backward mouse button's mouseup and forward
mouse button's mouseup which is handled by going back and forward in the
history respectively:))
Diffstat (limited to 'Ladybird/Tab.cpp')
-rw-r--r-- | Ladybird/Tab.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Ladybird/Tab.cpp b/Ladybird/Tab.cpp index b68c166bc9..d1430c0bbd 100644 --- a/Ladybird/Tab.cpp +++ b/Ladybird/Tab.cpp @@ -73,6 +73,14 @@ Tab::Tab(BrowserWindow* window) m_hover_label->hide(); }); + QObject::connect(m_view, &WebContentView::back_mouse_button, [this] { + back(); + }); + + QObject::connect(m_view, &WebContentView::forward_mouse_button, [this] { + forward(); + }); + QObject::connect(m_view, &WebContentView::load_started, [this](const URL& url) { m_location_edit->setText(url.to_string().characters()); m_history.push(url, m_title.toUtf8().data()); |