mirror of
https://github.com/RGBCube/serenity
synced 2025-05-29 16:45:11 +00:00

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>
27 lines
588 B
C++
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&);
|
|
};
|
|
|
|
}
|