Fix two list-marker issues:

- Decimal/text markers now inherit the current list-item font color.
  - Marker X/Y coordinates are pixel-snapped, eliminating blurry rendering.
  - The behavior is shared by <li> and textual <summary> markers.
  - Added focused tests for inherited color and integer positioning.
This commit is contained in:
Martín Lucas Golini
2026-08-23 18:50:45 -03:00
parent e269d65e01
commit 65a389aa96
5 changed files with 51 additions and 11 deletions
+9
View File
@@ -6,6 +6,10 @@
#include <eepp/math/rect.hpp>
#include <eepp/ui/csslayouttypes.hpp>
namespace EE { namespace Graphics {
class Text;
}} // namespace EE::Graphics
namespace EE { namespace UI {
class EE_API UIHTMLListStyle {
@@ -16,6 +20,11 @@ class EE_API UIHTMLListStyle {
static String getTextMarkerString( CSSListStyleType type, int index );
static void syncTextMarkerColor( Graphics::Text& marker, const Color& color );
static Vector2f getTextMarkerPosition( const Vector2f& screenPos, const Rectf& paddingPx,
Float textWidth, Float fontSize );
static void drawPrimitiveMarker( CSSListStyleType type, const Vector2f& screenPos,
const Rectf& paddingPx,
const Graphics::FontStyleConfig& style );