From 3c5a9b10b4dd6696861a62672b322807bb2bfdf6 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 27 Apr 2016 16:53:03 -0700 Subject: Qt: Display filter toolbar behavior tweaks. By default GtkToolbar shows overflow items in a menu. QToolBar shows them in a bigger toolbar. This is a problem for users with lots of display filter expressions because expanding the display filter toolbar can make it very tall. QToolBar can optionally overflow into a menu, but as noted in https://bugreports.qt.io/browse/QTBUG-2472 there isn't a way do so directly, e.g. with a setter. Force an overflow menu in the display filter toolbar by adding a child QToolBar and adding filter expression actions to it. While we're here, set the minimum width of the display filter edit to two-thirds of the width of the main window. Change-Id: I49cd58397e087f1aa79b5bbce471f827e9804148 Reviewed-on: https://code.wireshark.org/review/15134 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs --- ui/qt/main_window.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui/qt/main_window.h') diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index 235011fe57..72bf460479 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -154,6 +154,7 @@ private: QWidget *freeze_focus_; QMap td_actions; QMap tp_actions; + QToolBar *filter_expression_toolbar_; bool capture_stopping_; bool capture_filter_valid_; @@ -609,7 +610,8 @@ private slots: void on_actionContextWikiProtocolPage_triggered(); void on_actionContextFilterFieldReference_triggered(); - void changeEvent(QEvent* event); + virtual void changeEvent(QEvent* event); + virtual void resizeEvent(QResizeEvent *); #ifdef HAVE_EXTCAP void extcap_options_finished(int result); -- cgit v1.2.1