mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03:00
PixelPaint: Use a bucket cursor for the Bucket tool
This commit is contained in:
parent
0f24678eaf
commit
81b260bd1c
Notes:
sideshowbarker
2024-07-18 01:41:59 +09:00
Author: https://github.com/mrkct Commit: https://github.com/SerenityOS/serenity/commit/81b260bd1cb Pull-request: https://github.com/SerenityOS/serenity/pull/10381 Reviewed-by: https://github.com/BenWiederhake ✅ Reviewed-by: https://github.com/TobyAsE Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/kleinesfilmroellchen
@ -20,6 +20,9 @@ namespace PixelPaint {
|
||||
|
||||
BucketTool::BucketTool()
|
||||
{
|
||||
auto bucket_icon = Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/bucket.png");
|
||||
if (!bucket_icon.is_null())
|
||||
m_cursor = bucket_icon.release_nonnull();
|
||||
}
|
||||
|
||||
BucketTool::~BucketTool()
|
||||
|
@ -17,10 +17,12 @@ public:
|
||||
|
||||
virtual void on_mousedown(Layer*, MouseEvent&) override;
|
||||
virtual GUI::Widget* get_properties_widget() override;
|
||||
virtual Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> cursor() override { return m_cursor; }
|
||||
|
||||
private:
|
||||
RefPtr<GUI::Widget> m_properties_widget;
|
||||
int m_threshold { 0 };
|
||||
Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> m_cursor { Gfx::StandardCursor::Crosshair };
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user