aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-02-08 06:11:59 -0500
committerJohn Thacker <johnthacker@gmail.com>2023-02-08 14:47:32 +0000
commit4f14745fce765857741b67ecf35c7fc167920e98 (patch)
treee984956efa4220d3ff796105a73b0b688a65359e /ui
parent3123185b6e9af1c6270dc0e7dbd11ed0f0ec92e5 (diff)
Qt: Fencepost error in minimap/intelligent scrollbar
The location of the next line should be based off one row larger than the current row. This fixes an issue where all the lines drawn in the intelligent scrollbar are off by one - the color intended to be drawn for the first packet never appears, the first packet corresponds to the line for the second packet, etc., and there is a line at the bottom that can never be colored in. Fix #18850
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/packet_list.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index 361d180d07..40ab5ab3db 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -2052,7 +2052,7 @@ void PacketList::drawNearOverlay()
bgcolor = &color_filter->bg_color;
}
- int next_line = (row - start) * o_height / o_rows;
+ int next_line = (row - start + 1) * o_height / o_rows;
if (bgcolor) {
QColor color(ColorUtils::fromColorT(bgcolor));
painter.fillRect(0, cur_line, o_width, next_line - cur_line, color);