mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:37:45 +00:00
PixelPaint: Make tool properties widget construction non-fallible
`Tool::get_properties_widget()` now also returns a NNRP to a widget rather than a raw pointer.
This commit is contained in:
parent
5df88dab07
commit
f34b1c7a7e
41 changed files with 72 additions and 85 deletions
|
@ -67,7 +67,7 @@ public:
|
|||
virtual void on_secondary_color_change(Color) { }
|
||||
virtual void on_tool_activation() { }
|
||||
virtual void on_tool_deactivation() { }
|
||||
virtual ErrorOr<GUI::Widget*> get_properties_widget() { return nullptr; }
|
||||
virtual NonnullRefPtr<GUI::Widget> get_properties_widget() { return GUI::Widget::construct(); }
|
||||
virtual Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap const>> cursor() { return Gfx::StandardCursor::None; }
|
||||
virtual Gfx::IntPoint point_position_to_preferred_cell(Gfx::FloatPoint position) const { return position.to_type<int>(); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue