mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:17:45 +00:00
Browser: Add a special context menu for images
Now, right-clicking on an image allows you to open that image in this tab or a new tab. You can also copy the image URL, and even copy the image itself to the clipboard! :^) Copying to the clipboard will not work in a multi-process context yet, since we need to send the image bitmap across the IPC boundary and this patch does not do that.
This commit is contained in:
parent
91b49dd9d0
commit
44f9637e20
2 changed files with 31 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "History.h"
|
||||
#include <AK/URL.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibGfx/ShareableBitmap.h>
|
||||
#include <LibHTTP/HttpJob.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
|
@ -104,6 +105,10 @@ private:
|
|||
RefPtr<GUI::Action> m_link_context_menu_default_action;
|
||||
URL m_link_context_menu_url;
|
||||
|
||||
RefPtr<GUI::Menu> m_image_context_menu;
|
||||
Gfx::ShareableBitmap m_image_context_menu_bitmap;
|
||||
URL m_image_context_menu_url;
|
||||
|
||||
RefPtr<GUI::Menu> m_tab_context_menu;
|
||||
RefPtr<GUI::Menu> m_page_context_menu;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue