summaryrefslogtreecommitdiff
path: root/ui/qt/byte_view_tab.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-09-23 13:35:10 -0700
committerGerald Combs <gerald@wireshark.org>2014-09-23 22:32:53 +0000
commit31e86998fbaaa4e82e0c502249671025c587ef50 (patch)
tree632b25070763766d51bbc2d291b3022f8ec47352 /ui/qt/byte_view_tab.cpp
parent3a85a5eb96aff95b1711961708b863a556d461f1 (diff)
downloadwireshark-31e86998fbaaa4e82e0c502249671025c587ef50.tar.gz
Qt: Add zoom and column resize actions.
Plumb signals and slots for changing the text size in the main window. Remove the bold font code from WiresharkApplication. It was only used in ByteViewText. Adjust the icons a bit. Bug: When we change the font preferences the packet list stops drawing cached strings. I haven't been able to track down the cause. Change-Id: I609d740c9f26265628fa4b7de1b75b0e56651387 Reviewed-on: https://code.wireshark.org/review/4269 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/byte_view_tab.cpp')
-rw-r--r--ui/qt/byte_view_tab.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/qt/byte_view_tab.cpp b/ui/qt/byte_view_tab.cpp
index 541b89b80e..04b3008b13 100644
--- a/ui/qt/byte_view_tab.cpp
+++ b/ui/qt/byte_view_tab.cpp
@@ -35,6 +35,8 @@ void ByteViewTab::addTab(const char *name, tvbuff_t *tvb, proto_tree *tree, QTre
ByteViewText *byte_view_text = new ByteViewText(this, tvb, tree, protoTree, encoding);
byte_view_text->setAccessibleName(name);
+ byte_view_text->setMonospaceFont(mono_font_);
+ connect(this, SIGNAL(monospaceFontChanged(QFont)), byte_view_text, SLOT(setMonospaceFont(QFont)));
QTabWidget::addTab(byte_view_text, name);
}
@@ -181,6 +183,13 @@ void ByteViewTab::setCaptureFile(capture_file *cf)
cap_file_ = cf;
}
+void ByteViewTab::setMonospaceFont(const QFont &mono_font)
+{
+ mono_font_ = mono_font;
+ emit monospaceFontChanged(mono_font_);
+ update();
+}
+
/*
* Editor modelines
*