mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
MasterWord: Add fullscreen option
Required allowing resizing. Perhaps an additional setting to allow fullscreen, but not resizing? Anyhow, the game still plays well if you can resize and works as expected.
This commit is contained in:
parent
5f56c946c2
commit
7dba28fce8
Notes:
sideshowbarker
2024-07-16 23:08:48 +09:00
Author: https://github.com/hughdavenport Commit: https://github.com/SerenityOS/serenity/commit/7dba28fce8 Pull-request: https://github.com/SerenityOS/serenity/pull/22591 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 6 additions and 1 deletions
|
@ -44,7 +44,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
window->set_double_buffering_enabled(false);
|
||||
window->set_title("MasterWord");
|
||||
window->set_resizable(false);
|
||||
window->set_resizable(true);
|
||||
window->set_auto_shrink(true);
|
||||
|
||||
auto main_widget = TRY(MasterWord::MainWidget::try_create());
|
||||
|
@ -127,6 +127,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
theme_actions.add_action(system_theme_action);
|
||||
theme_actions.add_action(wordle_theme_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_help_action([](auto&) {
|
||||
|
|
Loading…
Reference in a new issue