mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:27:35 +00:00
Ladybird: Add common handy actions to context menu
This commit adds the common actions you'd expect to the Ladybird context menu, arranged like so: ┌──────────────────────────────┐ │ Go Back Alt+Left │ │ Go Forward Alt+Right │ │ Reload Ctrl+R │ │ ──────────────────────────── │ │ Copy Ctrl+C │ │ Select All Ctrl+A │ │ ──────────────────────────── │ │ View Source Ctrl+U │ │ Inspect Element │ └──────────────────────────────┘
This commit is contained in:
parent
2b269cf425
commit
404804db36
4 changed files with 65 additions and 35 deletions
|
@ -32,6 +32,21 @@ public:
|
|||
|
||||
int tab_index(Tab*);
|
||||
|
||||
QAction& go_back_action()
|
||||
{
|
||||
return *m_go_back_action;
|
||||
}
|
||||
|
||||
QAction& go_forward_action()
|
||||
{
|
||||
return *m_go_forward_action;
|
||||
}
|
||||
|
||||
QAction& reload_action()
|
||||
{
|
||||
return *m_reload_action;
|
||||
}
|
||||
|
||||
public slots:
|
||||
void tab_title_changed(int index, QString const&);
|
||||
void tab_favicon_changed(int index, QIcon icon);
|
||||
|
@ -68,6 +83,11 @@ private:
|
|||
Tab* m_current_tab { nullptr };
|
||||
QMenu* m_zoom_menu { nullptr };
|
||||
|
||||
OwnPtr<QMenu> m_context_menu {};
|
||||
OwnPtr<QAction> m_go_back_action {};
|
||||
OwnPtr<QAction> m_go_forward_action {};
|
||||
OwnPtr<QAction> m_reload_action {};
|
||||
|
||||
Browser::CookieJar& m_cookie_jar;
|
||||
|
||||
StringView m_webdriver_content_ipc_path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue