We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 376e4f7 commit 3beaeb4Copy full SHA for 3beaeb4
1 file changed
src/libs/browser/webview.cpp
@@ -29,6 +29,8 @@
29
#include <QWebEngineContextMenuRequest>
30
#endif
31
32
+#include <algorithm>
33
+
34
using namespace Zeal::Browser;
35
36
WebView::WebView(QWidget *parent)
@@ -62,7 +64,8 @@ void WebView::setZoomLevel(int level)
62
64
m_zoomLevel = level;
63
65
66
// Scale the webview relative to the DPI of the screen.
- const double dpiZoomFactor = logicalDpiY() / 96.0;
67
+ // Only scale up for HiDPI displays (>96 DPI), never scale down.
68
+ const double dpiZoomFactor = std::max(1.0, logicalDpiY() / 96.0);
69
70
setZoomFactor(availableZoomLevels().at(level) / 100.0 * dpiZoomFactor);
71
emit zoomLevelChanged();
0 commit comments