From 419f8bb9cb4dcb1e38da1c3c5ec56ed975fbb019 Mon Sep 17 00:00:00 2001 From: DanS Date: Wed, 1 Jul 2026 23:35:01 -0500 Subject: [PATCH] fix(console): fill scanline banding into the empty space below the last row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The zebra banding is emitted per text row, so it stopped at the last line and left the bottom fade-padding (up to 18% of the panel) unbanded — very visible when scrolled/pinned to the bottom. After the text-row bands, continue the alternating pattern (same parity, lineHeight pitch) down to the panel bottom so the zebra fills the whole output area. Also covers the case where the content is shorter than the panel. Full-node + lite build clean; source hygiene clean. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/windows/console_tab.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ui/windows/console_tab.cpp b/src/ui/windows/console_tab.cpp index 118fdad..f1955dc 100644 --- a/src/ui/windows/console_tab.cpp +++ b/src/ui/windows/console_tab.cpp @@ -327,6 +327,21 @@ void ConsoleTab::render(ConsoleCommandExecutor& exec) (row.rowIndex % 2 == 0) ? lightCol : darkCol); } } + // Continue the banding into any empty space below the last text row (the bottom + // fade padding, or when the content is shorter than the panel) so the zebra fills + // the whole panel instead of stopping short. + if (!scanline_rows_.empty()) { + const auto& last = scanline_rows_.back(); + int parity = (last.rowIndex + 1) & 1; + for (float y = last.yBot; y < outPanelMax.y; y += textLineH) { + float yTop = std::max(y, outPanelMin.y); + float yBot = std::min(y + textLineH, outPanelMax.y); + if (yTop < yBot) + dlOut->AddRectFilled(ImVec2(outPanelMin.x, yTop), ImVec2(outPanelMax.x, yBot), + (parity == 0) ? lightCol : darkCol); + parity ^= 1; + } + } } float panelH = outPanelMax.y - outPanelMin.y;