aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2017-11-20 21:13:21 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2017-11-21 07:38:38 +0000
commit90e236fd09d68bab09edb7b93227fc02de561a38 (patch)
treedfcced66774c805275e5691a699f0bcd5334d28d /ui
parent23b6028e1d729e67af5be1bb4bdbb5c88c284393 (diff)
Qt: Main Welcome hover sparkline color fix.
Use the default text color for sparkline in hovered items. This makes the selected item look the same as non-selected items when hovering. This is related to g1ed38dc2. Change-Id: I96ba349067cf7d398d11425cfa5ada5e5b4d587c Reviewed-on: https://code.wireshark.org/review/24516 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/models/sparkline_delegate.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/qt/models/sparkline_delegate.cpp b/ui/qt/models/sparkline_delegate.cpp
index 2c3fc9c232..fb08a971b3 100644
--- a/ui/qt/models/sparkline_delegate.cpp
+++ b/ui/qt/models/sparkline_delegate.cpp
@@ -74,7 +74,11 @@ void SparkLineDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(option_vi.state & QStyle::State_Active))
cg = QPalette::Inactive;
+#if defined(Q_OS_WIN)
if (option_vi.state & QStyle::State_Selected) {
+#else
+ if ((option_vi.state & QStyle::State_Selected) && !(option_vi.state & QStyle::State_MouseOver)) {
+#endif
painter->setPen(option_vi.palette.color(cg, QPalette::HighlightedText));
} else {
painter->setPen(option_vi.palette.color(cg, QPalette::Text));