aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/color_utils.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-06-11 15:53:51 -0700
committerGerald Combs <gerald@wireshark.org>2015-07-16 22:57:31 +0000
commit255d53dfc11fa49eadd30fefe3ed5950b03e6659 (patch)
tree1404c49ffb41d4f1245889f24e0e260e4cc011fd /ui/qt/color_utils.cpp
parent3e059c9d1fedf9c890f910fa88cc2ef99fb1e470 (diff)
Draw packet colors in the packet list scrollbar.
Inspired by (but not as fancy as) Packet Fence, an enhancement written for Ethereal a loooong time ago by Martin Visser: https://www.wireshark.org/lists/ethereal-dev/200011/msg00122.html Several text editors call this a "minimap". Color each scrollbar raster line to match the color of up to 7 packets. Note in the comments why this number was chosen. If we have any flagged frames (marked, ignored, time ref) indicate them on either side of the scrolbar. Handle HiDPI (retina) displays. This means that your window size depends on the height of your scrollbar *and* your monitor resolution. Qt's idea of the slider rect doesn't match up with the slider on OS X. This might be local to my build -- I can replicate it Qt Creator. Change-Id: Ia089d2d766ce37bab11e22d1a5721b4908935304 Reviewed-on: https://code.wireshark.org/review/8982 Reviewed-by: Gerald Combs <gerald@wireshark.org> Tested-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/color_utils.cpp')
-rw-r--r--ui/qt/color_utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/color_utils.cpp b/ui/qt/color_utils.cpp
index f63b2a0378..dbb93530f5 100644
--- a/ui/qt/color_utils.cpp
+++ b/ui/qt/color_utils.cpp
@@ -76,7 +76,7 @@ ColorUtils::ColorUtils(QObject *parent) :
{
}
-QColor ColorUtils::fromColorT (color_t *color) {
+QColor ColorUtils::fromColorT (const color_t *color) {
if (!color) return QColor();
return QColor(color->red >> 8, color->green >> 8, color->blue >> 8);
}