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
commit 8882b6bd9a
Notes: sideshowbarker 2024-07-19 06:41:01 +09:00
18 changed files with 92 additions and 203 deletions

View file

@ -27,7 +27,6 @@
#include "LineTool.h"
#include "ImageEditor.h"
#include "Layer.h"
#include "PaintableWidget.h"
#include <LibGUI/Action.h>
#include <LibGUI/Menu.h>
#include <LibGUI/Painter.h>
@ -74,7 +73,7 @@ void LineTool::on_mouseup(Layer& layer, GUI::MouseEvent& event, GUI::MouseEvent&
{
if (event.button() == m_drawing_button) {
GUI::Painter painter(layer.bitmap());
painter.draw_line(m_line_start_position, m_line_end_position, PaintableWidget::the().color_for(m_drawing_button), m_thickness);
painter.draw_line(m_line_start_position, m_line_end_position, m_editor->color_for(m_drawing_button), m_thickness);
m_drawing_button = GUI::MouseButton::None;
m_editor->update();
}