From 64a3a78fbd58a8d1808f9ae4fd4f1d03954850e6 Mon Sep 17 00:00:00 2001 From: Antoine Aflalo <197810+Belphemur@users.noreply.github.com> Date: Sun, 30 Aug 2026 18:29:04 +0000 Subject: [PATCH] fix(ui): thread dithered foreground through textStyleWithForeground MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A disabled list row (e.g. ListItem with enabled=false) resolves to a dither(LightGray) foreground, but textStyleWithForeground only copied the color for Solid paints. The Dither foreground fell back to TextStyle's default Black, so the rasterizer took the solid-black path and the row rendered pixel-identical to an enabled one — its disabled state was invisible. Handle PaintKind::Dither by copying the color (and not forcing inverted), so the renderer's dithered text path renders the gray label. The disabled row background is intentionally left as solid White; only the label dims. Host harness: 2796 checks, 0 failed. --- libs/ui/FreeInkUI/src/FreeInkUI.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/ui/FreeInkUI/src/FreeInkUI.cpp b/libs/ui/FreeInkUI/src/FreeInkUI.cpp index 0df56266..fc1a5b5a 100644 --- a/libs/ui/FreeInkUI/src/FreeInkUI.cpp +++ b/libs/ui/FreeInkUI/src/FreeInkUI.cpp @@ -889,6 +889,14 @@ TextStyle textStyleWithForeground(TextStyle text, Paint foreground) { if (foreground.kind == PaintKind::Solid) { text.color = foreground.color; text.inverted = foreground.color == Color::White; + } else if (foreground.kind == PaintKind::Dither) { + // A dithered foreground (e.g. a disabled list row's dither(LightGray)) + // must reach the renderer's dithered text path. Without this, the color + // stays at its default Black and the rasterizer takes the solid-black + // path, so a disabled row renders indistinguishable from an enabled one + // even though its resolved style carried a gray foreground. + text.color = foreground.color; + text.inverted = false; } return text; }