mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:37:34 +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:
parent
3b3df40eb9
commit
1ad08ab7d6
6 changed files with 40 additions and 3 deletions
|
@ -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>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue