1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:17:35 +00:00

LibWeb: Add scaleable checkboxes (with theme/accent-color support)

This reworks checkboxes to use a tiny 16x16 SDF for the tick icon along
with an antialiased background/border.

The checkbox now works well at any scale, shows the various checkbox
state (enabled, disabled, being pressed), and supports using the colors
from the active system theme and/or the accent-color property.
This commit is contained in:
MacDue 2023-03-19 23:55:03 +00:00 committed by Sam Atkins
parent 77456d1d0b
commit cfc9966654
3 changed files with 129 additions and 28 deletions

View file

@ -20,6 +20,8 @@ public:
Layout::CheckBox const& layout_box() const;
Layout::CheckBox& layout_box();
virtual void paint(PaintContext&, PaintPhase) const override;
private:
CheckBoxPaintable(Layout::CheckBox const&);
};