mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user