1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 16:45:11 +00:00
serenity/Userland/Libraries/LibWeb/Painting/CheckBoxPaintable.h
Linus Groh 2ad9c1fd6c LibWeb: Re-implement checkbox painting using the UA stylesheet
The checkbox provided by ClassicStylePainter is not scaling-aware and
generally unflexible, instead use the UA default stylesheet with a
handful of properties, the same way we already style buttons and text
inputs.

Thanks to Xexxa for the nice checkmark image!

Co-Authored-By: Xexxa <93391300+Xexxa@users.noreply.github.com>
2023-02-12 00:15:52 +00:00

27 lines
588 B
C++

/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Layout/CheckBox.h>
#include <LibWeb/Painting/LabelablePaintable.h>
namespace Web::Painting {
class CheckBoxPaintable final : public LabelablePaintable {
JS_CELL(CheckBoxPaintable, LabelablePaintable);
public:
static JS::NonnullGCPtr<CheckBoxPaintable> create(Layout::CheckBox const&);
Layout::CheckBox const& layout_box() const;
Layout::CheckBox& layout_box();
private:
CheckBoxPaintable(Layout::CheckBox const&);
};
}