aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/main_window.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-02-17 19:50:48 -0800
committerGerald Combs <gerald@wireshark.org>2018-02-19 00:13:14 +0000
commit042cfea07c8fd723a763d52378ae197a53b444fe (patch)
tree6fbbb2998d191e6cbe0bfa96d45254ff88b8c1d4 /ui/qt/main_window.cpp
parentc61b543e97f85fbe6a30f0368a7c6975bdd21fc8 (diff)
Qt: Use QFrames as separators in the filter expression toolbar.
Use QFrames instead of QActions as separators in the filter expression toolbar. This keeps them from showing up in the overflow menu. Change-Id: I60f6f0434fe5ba88fe1b4221e9e70640eed840bb Reviewed-on: https://code.wireshark.org/review/25860 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/main_window.cpp')
-rw-r--r--ui/qt/main_window.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index a5ab9aee39..2756ab4bf4 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -397,17 +397,17 @@ MainWindow::MainWindow(QWidget *parent) :
// larger toolbar. We do this by adding them to a child toolbar.
// https://bugreports.qt.io/browse/QTBUG-2472
filter_expression_toolbar_ = new DragDropToolBar();
- // Try to draw separator lines from the button label ascent to its baseline.
+ // Try to draw 1-pixel-wide separator lines from the button label
+ // ascent to its baseline.
int sep_margin = (filter_expression_toolbar_->fontMetrics().height() * 0.5) - 1;
QColor sep_color = ColorUtils::alphaBlend(filter_expression_toolbar_->palette().text(),
- filter_expression_toolbar_->palette().base(), 0.5);
- sep_color.setAlphaF(0.3);
+ filter_expression_toolbar_->palette().base(), 0.3);
filter_expression_toolbar_->setStyleSheet(QString(
"QToolBar { background: none; border: none; spacing: 1px; }"
- "QToolBar::separator {"
- " width: 1px; max-width: 1px;"
- " margin-top: %1px; margin-bottom: %2px;"
- " background: %3; }"
+ "QFrame {"
+ " min-width: 1px; max-width: 1px;"
+ " margin: %1px 0 %2px 0; padding: 0;"
+ " background-color: %3;"
"}"
).arg(sep_margin).arg(sep_margin - 1).arg(sep_color.name()));