diff options
-rw-r--r-- | Userland/Applications/PixelPaint/EllipseTool.cpp | 10 | ||||
-rw-r--r-- | Userland/Applications/PixelPaint/EllipseTool.h | 4 | ||||
-rw-r--r-- | Userland/Applications/PixelPaint/RectangleTool.cpp | 14 | ||||
-rw-r--r-- | Userland/Applications/PixelPaint/RectangleTool.h | 4 |
4 files changed, 16 insertions, 16 deletions
diff --git a/Userland/Applications/PixelPaint/EllipseTool.cpp b/Userland/Applications/PixelPaint/EllipseTool.cpp index 5c5e4666c5..d60ad0baee 100644 --- a/Userland/Applications/PixelPaint/EllipseTool.cpp +++ b/Userland/Applications/PixelPaint/EllipseTool.cpp @@ -37,11 +37,11 @@ void EllipseTool::draw_using(GUI::Painter& painter, Gfx::IntPoint const& start_p ellipse_intersecting_rect = Gfx::IntRect::from_two_points(start_position, end_position); } - switch (m_mode) { - case Mode::Outline: + switch (m_fill_mode) { + case FillMode::Outline: painter.draw_ellipse_intersecting(ellipse_intersecting_rect, m_editor->color_for(m_drawing_button), m_thickness); break; - case Mode::Fill: + case FillMode::Fill: painter.fill_ellipse(ellipse_intersecting_rect, m_editor->color_for(m_drawing_button)); break; default: @@ -148,10 +148,10 @@ GUI::Widget* EllipseTool::get_properties_widget() auto& fill_mode_radio = mode_radio_container.add<GUI::RadioButton>("Fill"); outline_mode_radio.on_checked = [&](bool) { - m_mode = Mode::Outline; + m_fill_mode = FillMode::Outline; }; fill_mode_radio.on_checked = [&](bool) { - m_mode = Mode::Fill; + m_fill_mode = FillMode::Fill; }; outline_mode_radio.set_checked(true); diff --git a/Userland/Applications/PixelPaint/EllipseTool.h b/Userland/Applications/PixelPaint/EllipseTool.h index 9f85b95e73..059c4f055f 100644 --- a/Userland/Applications/PixelPaint/EllipseTool.h +++ b/Userland/Applications/PixelPaint/EllipseTool.h @@ -27,7 +27,7 @@ public: virtual Gfx::StandardCursor cursor() override { return Gfx::StandardCursor::Crosshair; } private: - enum class Mode { + enum class FillMode { Outline, Fill, }; @@ -44,7 +44,7 @@ private: Gfx::IntPoint m_ellipse_start_position; Gfx::IntPoint m_ellipse_end_position; int m_thickness { 1 }; - Mode m_mode { Mode::Outline }; + FillMode m_fill_mode { FillMode::Outline }; DrawMode m_draw_mode { DrawMode::FromCorner }; }; diff --git a/Userland/Applications/PixelPaint/RectangleTool.cpp b/Userland/Applications/PixelPaint/RectangleTool.cpp index 066b507752..34b9395c33 100644 --- a/Userland/Applications/PixelPaint/RectangleTool.cpp +++ b/Userland/Applications/PixelPaint/RectangleTool.cpp @@ -36,14 +36,14 @@ void RectangleTool::draw_using(GUI::Painter& painter, Gfx::IntPoint const& start rect = Gfx::IntRect::from_two_points(start_position, end_position); } - switch (m_mode) { - case Mode::Fill: + switch (m_fill_mode) { + case FillMode::Fill: painter.fill_rect(rect, m_editor->color_for(m_drawing_button)); break; - case Mode::Outline: + case FillMode::Outline: painter.draw_rect(rect, m_editor->color_for(m_drawing_button)); break; - case Mode::Gradient: + case FillMode::Gradient: painter.fill_rect_with_gradient(rect, m_editor->primary_color(), m_editor->secondary_color()); break; default: @@ -138,13 +138,13 @@ GUI::Widget* RectangleTool::get_properties_widget() auto& gradient_mode_radio = mode_radio_container.add<GUI::RadioButton>("Gradient"); outline_mode_radio.on_checked = [&](bool) { - m_mode = Mode::Outline; + m_fill_mode = FillMode::Outline; }; fill_mode_radio.on_checked = [&](bool) { - m_mode = Mode::Fill; + m_fill_mode = FillMode::Fill; }; gradient_mode_radio.on_checked = [&](bool) { - m_mode = Mode::Gradient; + m_fill_mode = FillMode::Gradient; }; outline_mode_radio.set_checked(true); diff --git a/Userland/Applications/PixelPaint/RectangleTool.h b/Userland/Applications/PixelPaint/RectangleTool.h index fd437b6594..f84e4031cb 100644 --- a/Userland/Applications/PixelPaint/RectangleTool.h +++ b/Userland/Applications/PixelPaint/RectangleTool.h @@ -27,7 +27,7 @@ public: virtual Gfx::StandardCursor cursor() override { return Gfx::StandardCursor::Crosshair; } private: - enum class Mode { + enum class FillMode { Outline, Fill, Gradient, @@ -44,7 +44,7 @@ private: GUI::MouseButton m_drawing_button { GUI::MouseButton::None }; Gfx::IntPoint m_rectangle_start_position; Gfx::IntPoint m_rectangle_end_position; - Mode m_mode { Mode::Outline }; + FillMode m_fill_mode { FillMode::Outline }; DrawMode m_draw_mode { DrawMode::FromCorner }; }; |