diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-08-29 12:08:04 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-08-31 11:30:20 +0200 |
commit | 1c50442994068b8fe12ad1e92f161db0d546eef8 (patch) | |
tree | 3a6a4d8758afe141ac847ad3c7271785ad17267f /src | |
parent | 0850ff27a0916587fab57c2e48e4fe9c6c21a377 (diff) | |
download | mana-1c50442994068b8fe12ad1e92f161db0d546eef8.tar.gz mana-1c50442994068b8fe12ad1e92f161db0d546eef8.tar.bz2 mana-1c50442994068b8fe12ad1e92f161db0d546eef8.tar.xz mana-1c50442994068b8fe12ad1e92f161db0d546eef8.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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(); |