summaryrefslogtreecommitdiff
path: root/ui/qt/byte_view_text.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-06-12 16:07:30 -0700
committerGerald Combs <gerald@wireshark.org>2016-06-13 18:44:26 +0000
commitb8201aef9d3375dfaaa31aa00ea4686d91c2cf03 (patch)
tree27df5054d45b859136104ce0db0bcbaa685a7650 /ui/qt/byte_view_text.cpp
parent1dcaeb33ca8b219180a1f131a7fbef58213f040a (diff)
downloadwireshark-b8201aef9d3375dfaaa31aa00ea4686d91c2cf03.tar.gz
Qt: Main window tab behavior.
Make the main window tab order more closely match the GTK+ UI. Draw a focus rect in the byte view text while we're here. Change-Id: I04212c14ea7f0d6865b709533246760adc02f45a Reviewed-on: https://code.wireshark.org/review/15862 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/byte_view_text.cpp')
-rw-r--r--ui/qt/byte_view_text.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/qt/byte_view_text.cpp b/ui/qt/byte_view_text.cpp
index d010d86cdb..eca8360482 100644
--- a/ui/qt/byte_view_text.cpp
+++ b/ui/qt/byte_view_text.cpp
@@ -85,6 +85,10 @@ ByteViewText::ByteViewText(QWidget *parent, tvbuff_t *tvb, proto_tree *tree, QTr
connect(format_actions_, SIGNAL(triggered(QAction*)), this, SLOT(setHexDisplayFormat(QAction*)));
setMouseTracking(true);
+
+#ifdef Q_OS_MAC
+ setAttribute(Qt::WA_MacShowFocusRect, true);
+#endif
}
ByteViewText::~ByteViewText()
@@ -211,6 +215,10 @@ void ByteViewText::paintEvent(QPaintEvent *)
row_y += line_spacing_;
}
painter.restore();
+
+ QStyleOptionFocusRect option;
+ option.initFrom(this);
+ style()->drawPrimitive(QStyle::PE_FrameFocusRect, &option, &painter, this);
}
void ByteViewText::resizeEvent(QResizeEvent *)