diff options
author | Gerald Combs <gerald@wireshark.org> | 2014-10-28 17:10:45 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-10-29 00:16:01 +0000 |
commit | 451f7f04d5eb1edff46b6978469c799186d1bd41 (patch) | |
tree | 59aa032c62c97cd0f1890b8806f9651318b7a905 | |
parent | 0b03183f0ae5746b232eea4172dcae717e16c6a8 (diff) |
Qt: Better protocol highlight colors.
Use the "Window" palette colors for protocol-level highlighting.
Change-Id: Ife55d70041aa12110a00782d790be0d747b32562
Reviewed-on: https://code.wireshark.org/review/4979
Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r-- | ui/qt/byte_view_text.cpp | 4 | ||||
-rw-r--r-- | ui/qt/proto_tree.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ui/qt/byte_view_text.cpp b/ui/qt/byte_view_text.cpp index 47610deb16..8f161e152e 100644 --- a/ui/qt/byte_view_text.cpp +++ b/ui/qt/byte_view_text.cpp @@ -409,7 +409,7 @@ qreal ByteViewText::flushOffsetFragment(QPainter &painter, qreal x, int y, highl if (state == StateField) { painter.fillRect(QRectF(x, y, width, line_spacing_), palette().highlight()); } else if (state == StateProtocol) { - painter.fillRect(QRectF(x, y, width, line_spacing_), palette().alternateBase()); + painter.fillRect(QRectF(x, y, width, line_spacing_), palette().window()); } // Text @@ -418,7 +418,7 @@ qreal ByteViewText::flushOffsetFragment(QPainter &painter, qreal x, int y, highl case StateNormal: case StateProtocol: default: - text_brush = palette().text(); + text_brush = palette().windowText(); break; case StateField: text_brush = palette().highlightedText(); diff --git a/ui/qt/proto_tree.cpp b/ui/qt/proto_tree.cpp index eefa999986..36e597dc5a 100644 --- a/ui/qt/proto_tree.cpp +++ b/ui/qt/proto_tree.cpp @@ -94,7 +94,8 @@ proto_tree_draw_node(proto_node *node, gpointer data) QPalette pal = QApplication::palette(); if (fi && fi->hfinfo) { if(fi->hfinfo->type == FT_PROTOCOL) { - item->setData(0, Qt::BackgroundRole, pal.alternateBase()); + item->setData(0, Qt::BackgroundRole, pal.window()); + item->setData(0, Qt::ForegroundRole, pal.windowText()); } if((fi->hfinfo->type == FT_FRAMENUM) || |