diff options
author | Andreas Kling <kling@serenityos.org> | 2022-03-10 15:50:57 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-11 00:21:49 +0100 |
commit | 053766d79cc0916d073a96c3b4a515ba9d714cf6 (patch) | |
tree | 48f92ceeaeb5bc19dc262f6174749b249f1514f7 /Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp | |
parent | 0500dbc3f6e132cc4cb25b53812e2e71d04ff326 (diff) | |
download | serenity-053766d79cc0916d073a96c3b4a515ba9d714cf6.zip |
LibWeb: Split Paintable into Paintable and PaintableBox
To prepare for paintable inline content, we take the basic painting
functionality and hoist it into a base class.
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp b/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp index 33e480f78e..7ae96f64e5 100644 --- a/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.cpp @@ -17,13 +17,13 @@ NonnullOwnPtr<CheckBoxPaintable> CheckBoxPaintable::create(Layout::CheckBox cons } CheckBoxPaintable::CheckBoxPaintable(Layout::CheckBox const& layout_box) - : Paintable(layout_box) + : PaintableBox(layout_box) { } Layout::CheckBox const& CheckBoxPaintable::layout_box() const { - return static_cast<Layout::CheckBox const&>(m_layout_box); + return static_cast<Layout::CheckBox const&>(layout_node()); } void CheckBoxPaintable::paint(PaintContext& context, PaintPhase phase) const @@ -31,7 +31,7 @@ void CheckBoxPaintable::paint(PaintContext& context, PaintPhase phase) const if (!is_visible()) return; - Paintable::paint(context, phase); + PaintableBox::paint(context, phase); if (phase == PaintPhase::Foreground) Gfx::StylePainter::paint_check_box(context.painter(), enclosing_int_rect(absolute_rect()), context.palette(), layout_box().dom_node().enabled(), layout_box().dom_node().checked(), layout_box().being_pressed()); |