mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
Browser: Rename "take screenshot" action to "take visible screenshot"
This is to differentiate between this and an upcoming action to take a screenshot of the entire document.
This commit is contained in:
parent
f652c75f34
commit
59b1dfa4e5
3 changed files with 6 additions and 6 deletions
|
@ -244,13 +244,13 @@ void BrowserWindow::build_menus()
|
||||||
this);
|
this);
|
||||||
m_inspect_dom_node_action->set_status_tip("Open inspector for this element");
|
m_inspect_dom_node_action->set_status_tip("Open inspector for this element");
|
||||||
|
|
||||||
m_take_screenshot_action = GUI::Action::create(
|
m_take_visible_screenshot_action = GUI::Action::create(
|
||||||
"&Take Screenshot"sv, g_icon_bag.filetype_image, [this](auto&) {
|
"Take &Visible Screenshot"sv, g_icon_bag.filetype_image, [this](auto&) {
|
||||||
if (auto result = take_screenshot(); result.is_error())
|
if (auto result = take_screenshot(); result.is_error())
|
||||||
GUI::MessageBox::show_error(this, String::formatted("{}", result.error()));
|
GUI::MessageBox::show_error(this, String::formatted("{}", result.error()));
|
||||||
},
|
},
|
||||||
this);
|
this);
|
||||||
m_take_screenshot_action->set_status_tip("Save a screenshot of the current tab to the Downloads directory"sv);
|
m_take_visible_screenshot_action->set_status_tip("Save a screenshot of the visible portion of the current tab to the Downloads directory"sv);
|
||||||
|
|
||||||
auto& inspect_menu = add_menu("&Inspect");
|
auto& inspect_menu = add_menu("&Inspect");
|
||||||
inspect_menu.add_action(*m_view_source_action);
|
inspect_menu.add_action(*m_view_source_action);
|
||||||
|
|
|
@ -39,7 +39,7 @@ public:
|
||||||
GUI::Action& view_source_action() { return *m_view_source_action; }
|
GUI::Action& view_source_action() { return *m_view_source_action; }
|
||||||
GUI::Action& inspect_dom_tree_action() { return *m_inspect_dom_tree_action; }
|
GUI::Action& inspect_dom_tree_action() { return *m_inspect_dom_tree_action; }
|
||||||
GUI::Action& inspect_dom_node_action() { return *m_inspect_dom_node_action; }
|
GUI::Action& inspect_dom_node_action() { return *m_inspect_dom_node_action; }
|
||||||
GUI::Action& take_screenshot_action() { return *m_take_screenshot_action; }
|
GUI::Action& take_visible_screenshot_action() { return *m_take_visible_screenshot_action; }
|
||||||
|
|
||||||
void content_filters_changed();
|
void content_filters_changed();
|
||||||
void proxy_mappings_changed();
|
void proxy_mappings_changed();
|
||||||
|
@ -70,7 +70,7 @@ private:
|
||||||
RefPtr<GUI::Action> m_view_source_action;
|
RefPtr<GUI::Action> m_view_source_action;
|
||||||
RefPtr<GUI::Action> m_inspect_dom_tree_action;
|
RefPtr<GUI::Action> m_inspect_dom_tree_action;
|
||||||
RefPtr<GUI::Action> m_inspect_dom_node_action;
|
RefPtr<GUI::Action> m_inspect_dom_node_action;
|
||||||
RefPtr<GUI::Action> m_take_screenshot_action;
|
RefPtr<GUI::Action> m_take_visible_screenshot_action;
|
||||||
|
|
||||||
CookieJar& m_cookie_jar;
|
CookieJar& m_cookie_jar;
|
||||||
WindowActions m_window_actions;
|
WindowActions m_window_actions;
|
||||||
|
|
|
@ -405,7 +405,7 @@ Tab::Tab(BrowserWindow& window)
|
||||||
m_page_context_menu->add_action(window.inspect_dom_tree_action());
|
m_page_context_menu->add_action(window.inspect_dom_tree_action());
|
||||||
m_page_context_menu->add_action(window.inspect_dom_node_action());
|
m_page_context_menu->add_action(window.inspect_dom_node_action());
|
||||||
m_page_context_menu->add_separator();
|
m_page_context_menu->add_separator();
|
||||||
m_page_context_menu->add_action(window.take_screenshot_action());
|
m_page_context_menu->add_action(window.take_visible_screenshot_action());
|
||||||
view().on_context_menu_request = [&](auto& screen_position) {
|
view().on_context_menu_request = [&](auto& screen_position) {
|
||||||
m_page_context_menu->popup(screen_position);
|
m_page_context_menu->popup(screen_position);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue