diff options
author | Gerald Combs <gerald@wireshark.org> | 2017-07-27 16:42:25 -0700 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-07-28 02:13:10 +0000 |
commit | cf0870ad2102dd632a12f6093184f3faae9f6712 (patch) | |
tree | 3a36554cb3c67f11ecd7dac66a985d833034f4f3 /wireshark-qt.cpp | |
parent | a4788324cb8b8674062659310fe483543f5450e5 (diff) |
Qt: Set AA_EnableHighDpiScaling at startup.
Set Qt::AA_EnableHighDpiScaling before creating wsApp so that various UI
elements are scaled properly on Windows.
Change-Id: Iee4ff2d97b0834756c805fb3812d556ad3480436
Ping-Bug: 13877
Reviewed-on: https://code.wireshark.org/review/22826
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wireshark-qt.cpp')
-rw-r--r-- | wireshark-qt.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index 333240b072..259a1ead51 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -500,6 +500,17 @@ int main(int argc, char *qt_argv[]) reset_library_path(); #endif + // Scale up the UI. Windows, X11, Android. + // http://doc.qt.io/qt-5/scalability.html + // http://doc.qt.io/qt-5/highdpi.html + // https://bugreports.qt.io/browse/QTBUG-53022 - The device pixel ratio is pretty much bogus on Windows. + // https://bugreports.qt.io/browse/QTBUG-55510 - Windows have wrong size + // We do the equivalent on macOS by setting NSHighResolutionCapable + // in Info.plist. +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif + /* Create The Wireshark app */ WiresharkApplication ws_app(argc, qt_argv); |