diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-03-31 02:06:47 +0200 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2016-04-18 16:41:20 +0000 |
commit | 68ec6735e10bca144120106f82a896eb99b46fa3 (patch) | |
tree | 6b8f201bf582deaabfc2c89f7cb032b5bdf48afa /ui/qt/byte_view_text.h | |
parent | abaa076f75f39135144787495eed9e6ebf2bc48a (diff) |
Qt: highlight hovered byte
Make it easier to link the hex with ascii bytes. The background color
will become yellow for bytes with the mouse focus.
Bug: 11547
Change-Id: Iab87e598a302ecf7bb7b37cd6ad55ea291c02b82
Reviewed-on: https://code.wireshark.org/review/14716
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'ui/qt/byte_view_text.h')
-rw-r--r-- | ui/qt/byte_view_text.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/qt/byte_view_text.h b/ui/qt/byte_view_text.h index c7958a58b5..917813d19e 100644 --- a/ui/qt/byte_view_text.h +++ b/ui/qt/byte_view_text.h @@ -79,7 +79,7 @@ private: } highlight_state; void drawOffsetLine(QPainter &painter, const guint offset, const int row_y); - qreal flushOffsetFragment(QPainter &painter, qreal x, int y, highlight_state state, QString &text); + qreal flushOffsetFragment(QPainter &painter, qreal x, int y, highlight_state state, gboolean extra_highlight, QString &text); void scrollToByte(int byte); int offsetChars(); int offsetPixels(); @@ -87,6 +87,7 @@ private: int asciiPixels(); int totalPixels(); void updateScrollbars(); + int byteOffsetAtPixel(QPoint &pos); field_info *fieldAtPixel(QPoint &pos); static const int separator_interval_; @@ -108,6 +109,7 @@ private: QMenu ctx_menu_; // Data highlight + guint hovered_byte_offset; QPair<guint,guint> p_bound_; QPair<guint,guint> f_bound_; QPair<guint,guint> fa_bound_; |