mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 10:38:13 +00:00
PixelPaint: Add keyboard zoom shortcuts
You can now use Ctrl+= and Ctrl+- to zoom in and out.
This commit is contained in:
parent
b48b8c372e
commit
2976311536
3 changed files with 31 additions and 6 deletions
|
@ -217,12 +217,23 @@ int main(int argc, char** argv)
|
|||
image_editor.redo();
|
||||
});
|
||||
edit_menu.add_action(redo_action);
|
||||
|
||||
|
||||
auto& view_menu = menubar->add_menu("&View");
|
||||
view_menu.add_action(GUI::Action::create(
|
||||
"Zoom &In", { Mod_Ctrl, Key_Equal }, [&](auto&) {
|
||||
image_editor.scale_by(0.1f);
|
||||
},
|
||||
window));
|
||||
|
||||
view_menu.add_action(GUI::Action::create(
|
||||
"Zoom &Out", { Mod_Ctrl, Key_Minus }, [&](auto&) {
|
||||
image_editor.scale_by(-0.1f);
|
||||
},
|
||||
window));
|
||||
|
||||
view_menu.add_action(GUI::Action::create(
|
||||
"&Reset Zoom", { Mod_Ctrl, Key_0 }, [&](auto&) {
|
||||
image_editor.reset_scale_and_position();
|
||||
return;
|
||||
},
|
||||
window));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue