mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +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:
parent
4af0a99634
commit
79bcb90887
3 changed files with 24 additions and 1 deletions
|
@ -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 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue