mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
PixelPaint: Update text tool font color on primary color change
This commit is contained in:
parent
230c0b34d4
commit
d4cb089acb
2 changed files with 8 additions and 0 deletions
|
@ -41,6 +41,13 @@ TextTool::TextTool()
|
||||||
}).release_value_but_fixme_should_propagate_errors();
|
}).release_value_but_fixme_should_propagate_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TextTool::on_tool_activation()
|
||||||
|
{
|
||||||
|
m_editor->on_primary_color_change = [this](auto color) {
|
||||||
|
m_text_color = color;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
void TextTool::on_tool_deactivation()
|
void TextTool::on_tool_deactivation()
|
||||||
{
|
{
|
||||||
reset_tool();
|
reset_tool();
|
||||||
|
|
|
@ -37,6 +37,7 @@ public:
|
||||||
virtual void on_mousedown(Layer*, MouseEvent&) override;
|
virtual void on_mousedown(Layer*, MouseEvent&) override;
|
||||||
virtual bool on_keydown(GUI::KeyEvent&) override;
|
virtual bool on_keydown(GUI::KeyEvent&) override;
|
||||||
virtual void on_second_paint(Layer const*, GUI::PaintEvent&) override;
|
virtual void on_second_paint(Layer const*, GUI::PaintEvent&) override;
|
||||||
|
virtual void on_tool_activation() override;
|
||||||
virtual void on_tool_deactivation() override;
|
virtual void on_tool_deactivation() override;
|
||||||
virtual Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> cursor() override;
|
virtual Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> cursor() override;
|
||||||
virtual GUI::Widget* get_properties_widget() override;
|
virtual GUI::Widget* get_properties_widget() override;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue