1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:17:36 +00:00

PixelPaint: Add menu action to toggle pixel grid visibility

You can now toggle on/off the visibility of the pixel grid from
the View menu, if you don't want it shown for some reason.
This commit is contained in:
Mustafa Quraish 2021-09-10 23:12:25 -04:00 committed by Andreas Kling
parent 4af0a99634
commit 79bcb90887
3 changed files with 24 additions and 1 deletions

View file

@ -1,6 +1,7 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
* Copyright (c) 2021, Mustafa Quraish <mustafa@cs.toronto.edu>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -94,6 +95,9 @@ public:
void set_guide_visibility(bool show_guides);
Function<void(bool)> on_set_guide_visibility;
bool pixel_grid_visibility() const { return m_show_pixel_grid; }
void set_pixel_grid_visibility(bool show_pixel_grid);
private:
explicit ImageEditor(NonnullRefPtr<Image>);
@ -127,6 +131,7 @@ private:
NonnullRefPtrVector<Guide> m_guides;
bool m_show_guides { true };
bool m_show_pixel_grid { true };
Tool* m_active_tool { nullptr };