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

PixelPaint: Display color information on mousemove with the PickerTool

Per-channel values of the pixel color are now displayed in the status
bar when the PickerTool is selected. This information obviously updates
on mousemove.
This commit is contained in:
Lucas CHOLLET 2023-03-11 17:56:14 -05:00 committed by Andreas Kling
parent c587ada084
commit b5594bf9a2
3 changed files with 28 additions and 9 deletions

View file

@ -118,6 +118,7 @@ public:
Core::EventLoop& gui_event_loop() { return m_gui_event_loop; }
void set_status_info_to_color_at_mouse_position(Gfx::IntPoint position, bool sample_all_layers);
void set_editor_color_to_color_at_mouse_position(GUI::MouseEvent const& event, bool sample_all_layers);
void set_modified(DeprecatedString action_text);
@ -161,6 +162,8 @@ private:
void paint_selection(Gfx::Painter&);
Optional<Color> color_from_position(Gfx::IntPoint position, bool sample_all_layers);
NonnullRefPtr<Image> m_image;
RefPtr<Layer> m_active_layer;
GUI::UndoStack m_undo_stack;