Presenter: Change "Full Screen" action to "Toggle Full Screen"

When using its keybind, it didn't really feel right to press Shift+F5 to
enter fullscreen, but not to exit it!
This commit is contained in:
Caoimhe 2023-03-19 19:56:11 +00:00 committed by Andreas Kling
parent 1eb6484ebd
commit f2df495970
Notes: sideshowbarker 2024-07-16 22:38:12 +09:00

View File

@ -83,8 +83,9 @@ ErrorOr<void> PresenterWidget::initialize_menubar()
update_slides_actions();
}
});
m_full_screen_action = GUI::Action::create("&Full Screen", { KeyModifier::Mod_Shift, KeyCode::Key_F5 }, { KeyCode::Key_F11 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/fullscreen.png"sv)), [this](auto&) {
this->window()->set_fullscreen(true);
m_full_screen_action = GUI::Action::create("Toggle &Full Screen", { KeyModifier::Mod_Shift, KeyCode::Key_F5 }, { KeyCode::Key_F11 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/fullscreen.png"sv)), [this](auto&) {
auto* window = this->window();
window->set_fullscreen(!window->is_fullscreen());
});
m_present_from_first_slide_action = GUI::Action::create("Present From First &Slide", { KeyCode::Key_F5 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/play.png"sv)), [this](auto&) {
if (m_current_presentation) {