diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-05-15 17:02:26 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-05-16 04:22:20 +0000 |
commit | 62999cc6776e2b94e5a888ce77d6452a1020c660 (patch) | |
tree | 5fb2f0ac932eb72277e45d59bc298f36c01347c1 /ui/qt/capture_interfaces_dialog.cpp | |
parent | d3427b8a65d926ae4c85d0ec730eaf1a574041c3 (diff) |
Windows: Make sure more native dialogs handle HiDPI.
Add a WiresharkFileDialog class, which is a thin wrapper around a few
QFileDialog functions that sets per-monitor v2 DPI awareness before
showing native dialogs and resets the awareness context afterward.
Use it where we call QFileDialog::getXXX.
Change-Id: Ib711a70aa94b693a2515804a729f666ea7fbd673
Reviewed-on: https://code.wireshark.org/review/27568
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/capture_interfaces_dialog.cpp')
-rw-r--r-- | ui/qt/capture_interfaces_dialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp index 645f1d61e5..5f705465cc 100644 --- a/ui/qt/capture_interfaces_dialog.cpp +++ b/ui/qt/capture_interfaces_dialog.cpp @@ -22,7 +22,6 @@ #ifdef HAVE_LIBPCAP #include <QAbstractItemModel> -#include <QFileDialog> #include <QMessageBox> #include <QTimer> @@ -47,6 +46,7 @@ #include <ui/qt/utils/qt_ui_utils.h> #include <ui/qt/models/sparkline_delegate.h> +#include "ui/qt/widgets/wireshark_file_dialog.h" // To do: // - Set a size hint for item delegates. @@ -362,7 +362,7 @@ void CaptureInterfacesDialog::browseButtonClicked() open_dir = prefs.gui_fileopen_dir; break; } - QString file_name = QFileDialog::getSaveFileName(this, tr("Specify a Capture File"), open_dir); + QString file_name = WiresharkFileDialog::getSaveFileName(this, tr("Specify a Capture File"), open_dir); ui->filenameLineEdit->setText(file_name); } |