mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +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:
parent
c587ada084
commit
b5594bf9a2
3 changed files with 28 additions and 9 deletions
|
@ -27,7 +27,6 @@ void PickerTool::on_mouseup(Layer*, MouseEvent& event)
|
|||
auto layer_event = event.layer_event();
|
||||
if (layer_event.buttons() & GUI::MouseButton::Primary || layer_event.buttons() & GUI::MouseButton::Secondary)
|
||||
return;
|
||||
m_editor->set_appended_status_info(DeprecatedString::empty());
|
||||
}
|
||||
|
||||
void PickerTool::on_mousemove(Layer* layer, MouseEvent& event)
|
||||
|
@ -35,6 +34,8 @@ void PickerTool::on_mousemove(Layer* layer, MouseEvent& event)
|
|||
if (!layer)
|
||||
return;
|
||||
auto layer_event = event.layer_event();
|
||||
m_editor->set_status_info_to_color_at_mouse_position(layer_event.position(), m_sample_all_layers);
|
||||
|
||||
if (!(layer_event.buttons() & GUI::MouseButton::Primary || layer_event.buttons() & GUI::MouseButton::Secondary))
|
||||
return;
|
||||
m_editor->set_editor_color_to_color_at_mouse_position(layer_event, m_sample_all_layers);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue