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
 #include <QWebFrame>
21
 #include <QWebFrame>
22
 #include <QWebElement>
22
 #include <QWebElement>
23
 #include <QSettings>
23
 #include <QSettings>
24
+#include <QDesktopWidget>
25
+#include <QApplication>
24
 
26
 
25
 #ifndef TypicaWebViewHeader
27
 #ifndef TypicaWebViewHeader
26
 #define TypicaWebViewHeader
28
 #define TypicaWebViewHeader
59
 {
61
 {
60
 	page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks);
62
 	page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks);
61
 	connect(page(), SIGNAL(linkClicked(QUrl)), this, SLOT(linkDelegate(QUrl)));
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
 @ When a link is clicked, one of three things may happen. Certain reserved URLs
70
 @ When a link is clicked, one of three things may happen. Certain reserved URLs

Loading…
Cancel
Save