mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:17:46 +00:00
Browser: Pop up a context menu when requested on a bookmark button
This right click context menu currently allows for the removal of bookmarks as well as opening them in a new tab.
This commit is contained in:
parent
28f74df2e6
commit
5431e81bc3
3 changed files with 20 additions and 3 deletions
|
@ -42,7 +42,7 @@ public:
|
|||
GUI::Model* model() { return m_model.ptr(); }
|
||||
const GUI::Model* model() const { return m_model.ptr(); }
|
||||
|
||||
Function<void(const String&, const String&, unsigned modifiers)> on_bookmark_click;
|
||||
Function<void(const String& url, unsigned modifiers)> on_bookmark_click;
|
||||
Function<void(const String&, const String&)> on_bookmark_hover;
|
||||
|
||||
bool contains_bookmark(const String& url);
|
||||
|
@ -62,6 +62,9 @@ private:
|
|||
RefPtr<GUI::Widget> m_separator;
|
||||
RefPtr<GUI::Menu> m_additional_menu;
|
||||
|
||||
RefPtr<GUI::Menu> m_context_menu;
|
||||
String m_context_menu_url;
|
||||
|
||||
NonnullRefPtrVector<GUI::Button> m_bookmarks;
|
||||
|
||||
int m_last_visible_index { -1 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue