mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Browser: Add "Paste & Go" action to the location box
This commit is contained in:
parent
6caa5661f3
commit
d32889b19d
Notes:
sideshowbarker
2024-07-19 06:14:27 +09:00
Author: https://github.com/FalseHonesty Commit: https://github.com/SerenityOS/serenity/commit/d32889b19d9 Pull-request: https://github.com/SerenityOS/serenity/pull/2335
1 changed files with 6 additions and 0 deletions
|
@ -113,8 +113,14 @@ Tab::Tab()
|
|||
}
|
||||
|
||||
m_html_widget->load(location);
|
||||
m_location_box->set_focus(false);
|
||||
};
|
||||
|
||||
m_location_box->add_custom_context_menu_action(GUI::Action::create("Paste & Go", [this](auto&) {
|
||||
m_location_box->set_text(GUI::Clipboard::the().data());
|
||||
m_location_box->on_return_pressed();
|
||||
}));
|
||||
|
||||
m_bookmark_button = toolbar.add<GUI::Button>();
|
||||
m_bookmark_button->set_button_style(Gfx::ButtonStyle::CoolBar);
|
||||
m_bookmark_button->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/star-black.png"));
|
||||
|
|
Loading…
Reference in a new issue