LayoutListItemMarker.cpp 496 B

123456789101112131415161718
  1. #include <LibGUI/GPainter.h>
  2. #include <LibHTML/Layout/LayoutListItemMarker.h>
  3. LayoutListItemMarker::LayoutListItemMarker()
  4. : LayoutBox(nullptr, StyleProperties::create())
  5. {
  6. }
  7. LayoutListItemMarker::~LayoutListItemMarker()
  8. {
  9. }
  10. void LayoutListItemMarker::render(RenderingContext& context)
  11. {
  12. Rect bullet_rect { 0, 0, 4, 4 };
  13. bullet_rect.center_within(rect());
  14. context.painter().fill_rect(bullet_rect, style().color_or_fallback(CSS::PropertyID::Color, document(), Color::Black));
  15. }