diff options
-rw-r--r-- | docbook/release-notes.adoc | 6 | ||||
-rw-r--r-- | image/README.image | 2 | ||||
-rw-r--r-- | image/stock_icons.qrc | 3 | ||||
-rw-r--r-- | image/stock_icons/8x8/list-add.template.png (renamed from image/plus-8.png) | bin | 81 -> 81 bytes | |||
-rw-r--r-- | ui/qt/main_window.cpp | 2 | ||||
-rw-r--r-- | ui/qt/main_window.ui | 10 | ||||
-rw-r--r-- | ui/qt/utils/stock_icon.cpp | 2 | ||||
-rw-r--r-- | ui/qt/widgets/filter_expression_toolbar.cpp | 42 | ||||
-rw-r--r-- | ui/qt/widgets/filter_expression_toolbar.h | 4 |
9 files changed, 44 insertions, 27 deletions
diff --git a/docbook/release-notes.adoc b/docbook/release-notes.adoc index 3684ddecaa..a72a796fc5 100644 --- a/docbook/release-notes.adoc +++ b/docbook/release-notes.adoc @@ -17,8 +17,8 @@ used for troubleshooting, analysis, development and education. == What’s New -Many user interface improvements have been made. See the “New and Updated -Features” section below for more details. +Many improvements have been made. See the “New and Updated Features” +section below for more details. // === Bug Fixes @@ -34,6 +34,8 @@ Features” section below for more details. The following features are new (or have been significantly updated) since version 3.0.0: +* Dark mode support on macOS and dark theme support on other platforms + has been improved. * Brotli decompression support in HTTP/HTTP2 (requires the brotli library). * The build system now checks for a SpeexDSP system library installation. The bundled Speex resampler code is still provided as a fallback. diff --git a/image/README.image b/image/README.image index b86dfdb73a..36196e25de 100644 --- a/image/README.image +++ b/image/README.image @@ -41,7 +41,7 @@ image/capture_comment_add.png created from elements in image/capture_comment_disabled.png accessories-text-editor.svg and image/capture_comment_update.png paper-sheets.svg -plus-8.png macOS style add / remove icons. Created by Peter Hosey. +list-add.png macOS style add / remove icons. Created by Peter Hosey. minus-8.png Released under CC-PD. copy-8.png macOS style copy icon. diff --git a/image/stock_icons.qrc b/image/stock_icons.qrc index 71a3346db8..0b38e0a591 100644 --- a/image/stock_icons.qrc +++ b/image/stock_icons.qrc @@ -5,7 +5,7 @@ </qresource> <qresource prefix="/stock"> <file>minus-8.png</file> - <file>plus-8.png</file> + <file alias="plus-8.png">stock_icons/8x8/list-add.template.png</file> <file>copy-8.png</file> <file>delete_list.png</file> <file>delete_list@2x.png</file> @@ -15,6 +15,7 @@ <file>arrow_down@2x.png</file> </qresource> <qresource prefix=""> + <file>stock_icons/8x8/list-add.template.png</file> <file>stock_icons/14x14/x-capture-comment-update.png</file> <file>stock_icons/14x14/x-capture-comment-update@2x.png</file> <file>stock_icons/14x14/x-capture-filter-bookmark.png</file> diff --git a/image/plus-8.png b/image/stock_icons/8x8/list-add.template.png Binary files differindex f4796f1b7e..f4796f1b7e 100644 --- a/image/plus-8.png +++ b/image/stock_icons/8x8/list-add.template.png diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 6a532dec09..fabde28ecf 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -2012,6 +2012,8 @@ void MainWindow::initMainToolbarIcons() main_ui_->actionViewZoomOut->setIcon(StockIcon("zoom-out")); main_ui_->actionViewNormalSize->setIcon(StockIcon("zoom-original")); main_ui_->actionViewResizeColumns->setIcon(StockIcon("x-resize-columns")); + + main_ui_->actionNewDisplayFilterExpression->setIcon(StockIcon("list-add")); } void MainWindow::initShowHideMainWidgets() diff --git a/ui/qt/main_window.ui b/ui/qt/main_window.ui index 80e3603cec..4d2dcff706 100644 --- a/ui/qt/main_window.ui +++ b/ui/qt/main_window.ui @@ -2953,16 +2953,6 @@ </property> </action> <action name="actionNewDisplayFilterExpression"> - <property name="icon"> - <iconset resource="../../image/stock_icons.qrc"> - <normaloff>:/stock/plus-8.png</normaloff>:/stock/plus-8.png</iconset> - </property> - <property name="text"> - <string>Add a filter button</string> - </property> - <property name="iconText"> - <string>Expression…</string> - </property> <property name="toolTip"> <string>Add a display filter button.</string> </property> diff --git a/ui/qt/utils/stock_icon.cpp b/ui/qt/utils/stock_icon.cpp index 3ba3d04c83..b54b36dac8 100644 --- a/ui/qt/utils/stock_icon.cpp +++ b/ui/qt/utils/stock_icon.cpp @@ -75,7 +75,7 @@ StockIcon::StockIcon(const QString icon_name) : } // Is this one of our locally sourced, cage-free, organic icons? - QStringList types = QStringList() << "14x14" << "16x16" << "24x14" << "24x24"; + QStringList types = QStringList() << "8x8" << "14x14" << "16x16" << "24x14" << "24x24"; QList<QPalette::ColorGroup> color_groups = QList<QPalette::ColorGroup>() << QPalette::Disabled << QPalette::Active diff --git a/ui/qt/widgets/filter_expression_toolbar.cpp b/ui/qt/widgets/filter_expression_toolbar.cpp index 42036f23c6..cc56e46c87 100644 --- a/ui/qt/widgets/filter_expression_toolbar.cpp +++ b/ui/qt/widgets/filter_expression_toolbar.cpp @@ -34,18 +34,7 @@ struct filter_expression_data FilterExpressionToolBar::FilterExpressionToolBar(QWidget * parent) : DragDropToolBar(parent) { - // Try to draw 1-pixel-wide separator lines from the button label - // ascent to its baseline. - int sep_margin = (fontMetrics().height() * 0.5) - 1; - QColor sep_color = ColorUtils::alphaBlend(palette().text(), palette().base(), 0.3); - setStyleSheet(QString( - "QToolBar { background: none; border: none; spacing: 1px; }" - "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())); + updateStyleSheet(); setContextMenuPolicy(Qt::CustomContextMenu); @@ -60,6 +49,19 @@ FilterExpressionToolBar::FilterExpressionToolBar(QWidget * parent) : } +bool FilterExpressionToolBar::event(QEvent *event) +{ + switch (event->type()) { + case QEvent::PaletteChange: + updateStyleSheet(); + break; + default: + break; + + } + return DragDropToolBar::event(event); +} + void FilterExpressionToolBar::onCustomMenuHandler(const QPoint& pos) { QAction * filterAction = actionAt(pos); @@ -200,6 +202,22 @@ void FilterExpressionToolBar::toolBarShowPreferences() emit filterPreferences(); } +void FilterExpressionToolBar::updateStyleSheet() +{ + // Try to draw 1-pixel-wide separator lines from the button label + // ascent to its baseline. + int sep_margin = (fontMetrics().height() * 0.5) - 1; + QColor sep_color = ColorUtils::alphaBlend(palette().text(), palette().base(), 0.3); + setStyleSheet(QString( + "QToolBar { background: none; border: none; spacing: 1px; }" + "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())); +} + int FilterExpressionToolBar::uatRowIndexForFilter(QString label, QString expression) { int result = -1; diff --git a/ui/qt/widgets/filter_expression_toolbar.h b/ui/qt/widgets/filter_expression_toolbar.h index af4956c770..5601825549 100644 --- a/ui/qt/widgets/filter_expression_toolbar.h +++ b/ui/qt/widgets/filter_expression_toolbar.h @@ -20,6 +20,9 @@ class FilterExpressionToolBar : public DragDropToolBar public: explicit FilterExpressionToolBar(QWidget * parent = Q_NULLPTR); +protected: + virtual bool event(QEvent *event); + public slots: void filterExpressionsChanged(); @@ -41,6 +44,7 @@ private slots: void toolBarShowPreferences(); private: + void updateStyleSheet(); int uatRowIndexForFilter(QString label, QString expression); static gboolean filter_expression_add_action(const void *key, void *value, void *user_data); |