1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

PaintBrush: Remove the PaintableWidget

Moved the current colors to ImageEditor for now, although I don't think
that will be their final home.
This commit is contained in:
Andreas Kling 2020-05-13 12:47:47 +02:00
parent de42ddfd93
commit 8882b6bd9a
18 changed files with 92 additions and 203 deletions

View file

@ -25,8 +25,8 @@
*/
#include "PickerTool.h"
#include "ImageEditor.h"
#include "Layer.h"
#include "PaintableWidget.h"
#include <LibGfx/Bitmap.h>
namespace PaintBrush {
@ -45,9 +45,9 @@ void PickerTool::on_mousedown(Layer& layer, GUI::MouseEvent& event, GUI::MouseEv
return;
auto color = layer.bitmap().get_pixel(event.position());
if (event.button() == GUI::MouseButton::Left)
PaintableWidget::the().set_primary_color(color);
m_editor->set_primary_color(color);
else if (event.button() == GUI::MouseButton::Right)
PaintableWidget::the().set_secondary_color(color);
m_editor->set_secondary_color(color);
}
}