1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:37:46 +00:00

PixelPaint: Show Guides on GuideTool activation

This adds on_tool_activation() to Tool which GuideTool can use
to show guides, if they're hidden, when it's activated. Also
show guides on mousedown since there's no use in drawing invisible
guides.
This commit is contained in:
Marcus Nilsson 2021-08-13 22:40:29 +02:00 committed by Andreas Kling
parent 3b3df40eb9
commit 1ad08ab7d6
6 changed files with 40 additions and 3 deletions

View file

@ -85,7 +85,9 @@ public:
Gfx::FloatPoint editor_position_to_image_position(Gfx::IntPoint const&) const;
NonnullRefPtrVector<Guide> const& guides() const { return m_guides; }
void toggle_guide_visibility() { m_show_guides = !m_show_guides; }
bool guide_visibility() { return m_show_guides; }
void set_guide_visibility(bool show_guides);
Function<void(bool)> on_set_guide_visibility;
private:
explicit ImageEditor(NonnullRefPtr<Image>);