mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:37:45 +00:00
Applications: Add fullscreen option to Utilities
This commit is contained in:
parent
8886324cbf
commit
7fa0cf194f
6 changed files with 30 additions and 0 deletions
|
@ -129,6 +129,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
|
|
||||||
round_menu->action_at(last_rounding_mode.value())->activate();
|
round_menu->action_at(last_rounding_mode.value())->activate();
|
||||||
|
|
||||||
|
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);
|
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_command_palette_action(window));
|
||||||
help_menu->add_action(GUI::CommonActions::make_help_action([&man_file](auto&) {
|
help_menu->add_action(GUI::CommonActions::make_help_action([&man_file](auto&) {
|
||||||
|
|
|
@ -164,6 +164,11 @@ ErrorOr<void> CharacterMapWidget::initialize_menubar(GUI::Window& window)
|
||||||
GUI::Application::the()->quit();
|
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 help_menu = window.add_menu("&Help"_string);
|
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_command_palette_action(&window));
|
||||||
help_menu->add_action(GUI::CommonActions::make_help_action([&](auto&) {
|
help_menu->add_action(GUI::CommonActions::make_help_action([&](auto&) {
|
||||||
|
|
|
@ -1053,6 +1053,11 @@ ErrorOr<int> run_in_windowed_mode(ByteString const& initial_location, ByteString
|
||||||
view_menu->add_separator();
|
view_menu->add_separator();
|
||||||
view_menu->add_action(show_dotfiles_action);
|
view_menu->add_action(show_dotfiles_action);
|
||||||
|
|
||||||
|
view_menu->add_separator();
|
||||||
|
view_menu->add_action(GUI::CommonActions::make_fullscreen_action([&](auto&) {
|
||||||
|
window->set_fullscreen(!window->is_fullscreen());
|
||||||
|
}));
|
||||||
|
|
||||||
auto go_to_location_action = GUI::Action::create("Go to &Location...", { Mod_Ctrl, Key_L }, Key_F6, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-to.png"sv)), [&](auto&) {
|
auto go_to_location_action = GUI::Action::create("Go to &Location...", { Mod_Ctrl, Key_L }, Key_F6, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-to.png"sv)), [&](auto&) {
|
||||||
toolbar_container.set_visible(true);
|
toolbar_container.set_visible(true);
|
||||||
breadcrumb_toolbar.set_visible(true);
|
breadcrumb_toolbar.set_visible(true);
|
||||||
|
|
|
@ -80,6 +80,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
app->quit();
|
app->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 help_menu = window->add_menu("&Help"_string);
|
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_command_palette_action(window));
|
||||||
help_menu->add_action(GUI::CommonActions::make_about_action(APP_NAME, app_icon, window));
|
help_menu->add_action(GUI::CommonActions::make_about_action(APP_NAME, app_icon, window));
|
||||||
|
|
|
@ -468,6 +468,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
TRY(make_frequency_action(3));
|
TRY(make_frequency_action(3));
|
||||||
TRY(make_frequency_action(5));
|
TRY(make_frequency_action(5));
|
||||||
|
|
||||||
|
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);
|
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_command_palette_action(window));
|
||||||
help_menu->add_action(GUI::CommonActions::make_about_action("System Monitor"_string, app_icon, window));
|
help_menu->add_action(GUI::CommonActions::make_about_action("System Monitor"_string, app_icon, window));
|
||||||
|
|
|
@ -689,6 +689,11 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
syntax_actions.add_action(*m_sql_highlight);
|
syntax_actions.add_action(*m_sql_highlight);
|
||||||
syntax_menu->add_action(*m_sql_highlight);
|
syntax_menu->add_action(*m_sql_highlight);
|
||||||
|
|
||||||
|
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);
|
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_command_palette_action(&window));
|
||||||
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
|
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue