fix(console): fill scanline banding into the empty space below the last row
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user