RadioButton.cpp 734 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2021, Tim Flynn <trflynn89@serenityos.org>
  3. * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #include <LibGUI/Event.h>
  8. #include <LibWeb/DOM/Document.h>
  9. #include <LibWeb/Painting/RadioButtonPaintable.h>
  10. namespace Web::Layout {
  11. RadioButton::RadioButton(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr<CSS::StyleProperties> style)
  12. : FormAssociatedLabelableNode(document, element, move(style))
  13. {
  14. set_intrinsic_width(12);
  15. set_intrinsic_height(12);
  16. }
  17. RadioButton::~RadioButton() = default;
  18. RefPtr<Painting::Paintable> RadioButton::create_paintable() const
  19. {
  20. return Painting::RadioButtonPaintable::create(*this);
  21. }
  22. }