From 159a71bba7a6719ed8fe8e38b96e0469b88846eb Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Mon, 8 Mar 2021 10:35:55 -0600 Subject: [PATCH] [0.19][Web] Remove HiDPI fix when using QTWEBVIEW The screen scale adjustment code here should not be necessary when using the Chromium-based QtWebView widget, which correctly handles logical vs. device px units. The scaling causes poor font size choice when used on ultrawide monitors, as reported in https://forum.freecadweb.org/viewtopic.php?p=485431 --- src/Mod/Web/Gui/BrowserView.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Mod/Web/Gui/BrowserView.cpp b/src/Mod/Web/Gui/BrowserView.cpp index 775a83afd9..8c138967ed 100644 --- a/src/Mod/Web/Gui/BrowserView.cpp +++ b/src/Mod/Web/Gui/BrowserView.cpp @@ -239,6 +239,7 @@ Py::Object BrowserViewPy::setHtml(const Py::Tuple& args) WebView::WebView(QWidget *parent) : QWEBVIEW(parent) { +#ifdef QTWEBKIT // Increase html font size for high DPI displays #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QRect mainScreenSize = QApplication::primaryScreen()->geometry(); @@ -248,6 +249,7 @@ WebView::WebView(QWidget *parent) if (mainScreenSize.width() > 1920){ setTextSizeMultiplier (mainScreenSize.width()/1920.0); } +#endif } #ifdef QTWEBENGINE