From 1c50442994068b8fe12ad1e92f161db0d546eef8 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 29 Aug 2024 12:08:04 +0200 Subject: BrowserBox: Make sure to start each line with the default color This was already the case for each newly added line, but when the entire layout was redone previous selected colors would spill over to the next line. --- src/gui/widgets/browserbox.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index a0c361d0..07ed9299 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -282,7 +282,10 @@ void BrowserBox::relayoutText() */ void BrowserBox::layoutTextRow(TextRow &row, LayoutContext &context) { - context.font = getFont(); // each line starts with normal font + // each line starts with normal font in default color + context.font = getFont(); + context.selColor = context.textColor; + const int startY = context.y; row.parts.clear(); -- cgit v1.2.3-70-g09d2