aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-11-25 12:50:46 -0600
committerRoland Knall <rknall@gmail.com>2017-12-07 19:00:35 +0000
commitbe8a40005328d74815491b3536b85fe9e532243e (patch)
treec74b76c0f462d6772be046cb6f07d669acbb045a /epan/prefs.c
parentf8b19c6eecbf241ecede5b85811a772469cea0df (diff)
Qt: Use QTextLayout in ByteViewText.
Use QTextLayout to draw each line in ByteViewText instead of drawing fragments ourselves. Build our pixel-to-byte-offset map when we draw our first line, which should hopefully make it more accurate. This should fix layout and hover issues on some systems. Start moving common code to DataPrinter. Mark prefs.gui_hex_dump_highlight_style GTK+ only. Bug: 11844 Change-Id: Ifda16ae7dc1a5ea22570c0bfd0eb20cee621bfc9 Reviewed-on: https://code.wireshark.org/review/24717 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'epan/prefs.c')
-rw-r--r--epan/prefs.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/epan/prefs.c b/epan/prefs.c
index 89a4e54f50..9ae9cfd21b 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -5,19 +5,7 @@
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: GPL-2.0+
*/
#include "config.h"
@@ -109,6 +97,7 @@ static const enum_val_t gui_ptree_expander_style[] = {
{NULL, NULL, -1}
};
+/* GTK+ only. */
static const enum_val_t gui_hex_dump_highlight_style[] = {
{"BOLD", "BOLD", 0},
{"INVERSE", "INVERSE", 1},
@@ -3959,7 +3948,7 @@ pre_init_prefs(void)
prefs.gui_expert_composite_eyecandy = FALSE;
prefs.gui_ptree_line_style = 0;
prefs.gui_ptree_expander_style = 1;
- prefs.gui_hex_dump_highlight_style = 1;
+ prefs.gui_hex_dump_highlight_style = 1; /* GTK+ only */
prefs.filter_toolbar_show_in_statusbar = FALSE;
prefs.restore_filter_after_following_stream = FALSE;
prefs.gui_toolbar_main_style = TB_STYLE_ICONS;