mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
DevTools: Add fullscreen option
All except SQLStudio, as that causes a crash
This commit is contained in:
parent
eb5e8ac11b
commit
13c66ebf12
Notes:
sideshowbarker
2024-07-17 07:16:27 +09:00
Author: https://github.com/hughdavenport Commit: https://github.com/SerenityOS/serenity/commit/13c66ebf12 Pull-request: https://github.com/SerenityOS/serenity/pull/22591 Reviewed-by: https://github.com/ADKaster ✅
6 changed files with 29 additions and 0 deletions
|
@ -794,6 +794,11 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
scale_menu->add_action(*m_scale_ten_action);
|
||||
scale_menu->add_action(*m_scale_fifteen_action);
|
||||
|
||||
view_menu->add_separator();
|
||||
view_menu->add_action(GUI::CommonActions::make_fullscreen_action([&](auto&) {
|
||||
window.set_fullscreen(!window.is_fullscreen());
|
||||
}));
|
||||
|
||||
auto help_menu = window.add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(&window));
|
||||
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
|
|
|
@ -210,6 +210,11 @@ ErrorOr<void> MainWidget::initialize_fallibles(GUI::Window& window)
|
|||
GUI::Application::the()->quit();
|
||||
}));
|
||||
|
||||
auto view_menu = window.add_menu("&View"_string);
|
||||
view_menu->add_action(GUI::CommonActions::make_fullscreen_action([&](auto&) {
|
||||
window.set_fullscreen(!window.is_fullscreen());
|
||||
}));
|
||||
|
||||
auto go_menu = window.add_menu("&Go"_string);
|
||||
go_menu->add_action(*m_go_back_action);
|
||||
go_menu->add_action(*m_go_forward_action);
|
||||
|
|
|
@ -555,6 +555,11 @@ ErrorOr<void> HexEditorWidget::initialize_menubar(GUI::Window& window)
|
|||
little_endian_mode->set_checked(use_little_endian);
|
||||
big_endian_mode->set_checked(!use_little_endian);
|
||||
|
||||
view_menu->add_separator();
|
||||
view_menu->add_action(GUI::CommonActions::make_fullscreen_action([&](auto&) {
|
||||
window.set_fullscreen(!window.is_fullscreen());
|
||||
}));
|
||||
|
||||
auto help_menu = window.add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(&window));
|
||||
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
|
|
|
@ -94,6 +94,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto settings_menu = window->add_menu("&Settings"_string);
|
||||
settings_menu->add_action(auto_modifier_action);
|
||||
|
||||
auto view_menu = window->add_menu("&View"_string);
|
||||
view_menu->add_action(GUI::CommonActions::make_fullscreen_action([&](auto&) {
|
||||
window->set_fullscreen(!window->is_fullscreen());
|
||||
}));
|
||||
|
||||
auto help_menu = window->add_menu("&Help"_string);
|
||||
help_menu->add_action(GUI::CommonActions::make_command_palette_action(window));
|
||||
help_menu->add_action(GUI::CommonActions::make_about_action("Keyboard Mapper"_string, app_icon, window));
|
||||
|
|
|
@ -305,6 +305,11 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
GUI::Application::the()->quit();
|
||||
}));
|
||||
|
||||
auto view_menu = window.add_menu("&View"_string);
|
||||
view_menu->add_action(GUI::CommonActions::make_fullscreen_action([&](auto&) {
|
||||
window.set_fullscreen(!window.is_fullscreen());
|
||||
}));
|
||||
|
||||
window.add_menu(GUI::CommonMenus::make_accessibility_menu(*m_preview_widget));
|
||||
|
||||
auto help_menu = window.add_menu("&Help"_string);
|
||||
|
|
|
@ -267,6 +267,10 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
});
|
||||
view_menu->add_action(*m_view_window_action);
|
||||
m_views_group.add_action(*m_view_window_action);
|
||||
view_menu->add_separator();
|
||||
view_menu->add_action(GUI::CommonActions::make_fullscreen_action([&](auto&) {
|
||||
window.set_fullscreen(!window.is_fullscreen());
|
||||
}));
|
||||
|
||||
m_preview_window->on_close = [&] {
|
||||
m_view_frame_action->activate();
|
||||
|
|
Loading…
Reference in a new issue