diff options
author | Tobias Christiansen <tobi@tobyase.de> | 2021-08-05 15:48:59 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-08-07 02:52:47 +0430 |
commit | 0ca085910ea5b7540522763d21ddec0358e49620 (patch) | |
tree | 624e416cbf41e0054921a736f12b1a183f7275ae /Userland/Applications/PixelPaint/main.cpp | |
parent | 193f1e01cf718be38ce3c764613db668781b12a5 (diff) | |
download | serenity-0ca085910ea5b7540522763d21ddec0358e49620.zip |
PixelPaint: Make Guides' visibility optional
Whether Guides are drawn or not is now controlled via the menu-entry
View->Show Guides.
Diffstat (limited to 'Userland/Applications/PixelPaint/main.cpp')
-rw-r--r-- | Userland/Applications/PixelPaint/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/main.cpp b/Userland/Applications/PixelPaint/main.cpp index 7752df39a0..ee2c9b60b8 100644 --- a/Userland/Applications/PixelPaint/main.cpp +++ b/Userland/Applications/PixelPaint/main.cpp @@ -347,11 +347,21 @@ int main(int argc, char** argv) }, window); + auto show_guides_action = GUI::Action::create_checkable( + "Show Guides", [&](auto&) { + if (auto* editor = current_image_editor()) { + editor->toggle_guide_visibility(); + } + }, + window); + show_guides_action->set_checked(true); + view_menu.add_action(zoom_in_action); view_menu.add_action(zoom_out_action); view_menu.add_action(reset_zoom_action); view_menu.add_separator(); view_menu.add_action(add_guide_action); + view_menu.add_action(show_guides_action); auto& tool_menu = window->add_menu("&Tool"); toolbox.for_each_tool([&](auto& tool) { |