CheckBox.cpp 755 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2020-2022, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibGfx/Font.h>
  7. #include <LibWeb/HTML/BrowsingContext.h>
  8. #include <LibWeb/HTML/HTMLInputElement.h>
  9. #include <LibWeb/Layout/CheckBox.h>
  10. #include <LibWeb/Layout/Label.h>
  11. #include <LibWeb/Painting/CheckBoxPaintable.h>
  12. namespace Web::Layout {
  13. CheckBox::CheckBox(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr<CSS::StyleProperties> style)
  14. : LabelableNode(document, element, move(style))
  15. {
  16. set_intrinsic_width(13);
  17. set_intrinsic_height(13);
  18. }
  19. CheckBox::~CheckBox()
  20. {
  21. }
  22. RefPtr<Painting::Paintable> CheckBox::create_paintable() const
  23. {
  24. return Painting::CheckBoxPaintable::create(*this);
  25. }
  26. }