diff options
author | Gerald Combs <gerald@wireshark.org> | 2017-08-07 15:42:37 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2017-08-07 17:08:53 +0000 |
commit | 4053bde54b9c356bdee4f4e7548790ce5a06e9a5 (patch) | |
tree | b2ff0123b2763892efcc84b48f32d7005e71e760 | |
parent | 82ef9377fe88c213c5e5a02279d2714f88add665 (diff) |
Qt: Restrict AA_EnableHighDpiScaling to Windows.
Setting Qt::AA_EnableHighDpiScaling on X11 causes problems:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=13877#c20
Limit its use to Windows.
Change-Id: I8c11c575b2680402689644bcc5c224da876bba67
Ping-Bug: 13877
Reviewed-on: https://code.wireshark.org/review/22988
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r-- | wireshark-qt.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index 259a1ead51..ab7b99c666 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -500,14 +500,15 @@ int main(int argc, char *qt_argv[]) reset_library_path(); #endif - // Scale up the UI. Windows, X11, Android. + // Handle DPI scaling on Windows. This causes problems in at least + // one case on X11 and we don't yet support Android. + // We do the equivalent on macOS by setting NSHighResolutionCapable + // in Info.plist. // 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) +#if defined(Q_OS_WIN) && QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif |