Browse Source

Preliminary fix for reports on HiDPI screens

Neal Wilson 5 years ago
parent
commit
686151899c
Signed by: Neal Wilson <neal@typica.us> GPG Key ID: 2A0BDDE701E66EB9
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/webview.w

+ 6
- 0
src/webview.w View File

@@ -21,6 +21,8 @@ In order to simplify the implementation of certain features, we subclass
21 21
 #include <QWebFrame>
22 22
 #include <QWebElement>
23 23
 #include <QSettings>
24
+#include <QDesktopWidget>
25
+#include <QApplication>
24 26
 
25 27
 #ifndef TypicaWebViewHeader
26 28
 #define TypicaWebViewHeader
@@ -59,6 +61,10 @@ TypicaWebView::TypicaWebView() : QWebView()
59 61
 {
60 62
 	page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks);
61 63
 	connect(page(), SIGNAL(linkClicked(QUrl)), this, SLOT(linkDelegate(QUrl)));
64
+	
65
+    QDesktopWidget *desktop = QApplication::desktop();
66
+    const int dpi = desktop->logicalDpiX();
67
+    setZoomFactor(dpi/96);
62 68
 }
63 69
 
64 70
 @ When a link is clicked, one of three things may happen. Certain reserved URLs

Loading…
Cancel
Save