1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

QuickShow: Switch to full screen mode on double click

More respect to user behavior on image viewers :)
This commit is contained in:
Hüseyin ASLITÜRK 2020-06-16 10:47:47 +03:00 committed by Andreas Kling
parent 016fc9c133
commit bf3d98012a
3 changed files with 12 additions and 2 deletions

View file

@ -103,6 +103,10 @@ int main(int argc, char** argv)
}
}
};
widget.on_doubleclick = [&] {
window->set_fullscreen(!window->is_fullscreen());
toolbar_container.set_visible(!window->is_fullscreen());
};
// Actions
auto open_action = GUI::CommonActions::make_open_action(
@ -192,8 +196,7 @@ int main(int argc, char** argv)
auto full_sceen_action = GUI::CommonActions::make_fullscreen_action(
[&](auto&) {
window->set_fullscreen(!window->is_fullscreen());
toolbar_container.set_visible(!window->is_fullscreen());
widget.on_doubleclick();
});
auto zoom_in_action = GUI::Action::create("Zoom In", { Mod_None, Key_Plus }, Gfx::Bitmap::load_from_file("/res/icons/16x16/zoom-in.png"),