From 6311117f9d9bfbb0d0a8e977cf8e198bbc3d7f1a Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sat, 8 Apr 2017 21:19:32 +0100 Subject: [PATCH] Hi-DPI Support - OAuthDialog Scaling .. the QWebView embedded in OAuthDialog needs to be zoomed so you can see the fonts. .. the QT recomendation is to set the application wide scaling (!) to scale QWebEngine on hi-dpi screens obvs thats a really shit solution we ignore. --- src/Cloud/OAuthDialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Cloud/OAuthDialog.cpp b/src/Cloud/OAuthDialog.cpp index 745e618e7..9741164c0 100644 --- a/src/Cloud/OAuthDialog.cpp +++ b/src/Cloud/OAuthDialog.cpp @@ -22,6 +22,7 @@ #include "Athlete.h" #include "Context.h" #include "Settings.h" +#include "Colors.h" #include "TimeUtils.h" #if QT_VERSION > 0x050000 @@ -44,6 +45,9 @@ OAuthDialog::OAuthDialog(Context *context, OAuthSite site, CloudService *service setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("OAuth")); + // we need to scale up, since we zoom the webview on hi-dpi screens + setMinimumSize(640 *dpiXFactor, 640 *dpiYFactor); + if (service) { // ultimately this will be the only way this works if (service->name() == "Strava") site = this->site = STRAVA; if (service->name() == "Dropbox") site = this->site = DROPBOX; @@ -74,6 +78,7 @@ OAuthDialog::OAuthDialog(Context *context, OAuthSite site, CloudService *service #if defined(NOWEBKIT) || (QT_VERSION > 0x050000 && defined(Q_OS_MAC)) view = new QWebEngineView(); + view->setZoomFactor(dpiXFactor); #else view = new QWebView(); #endif