Skip to content

Commit

Permalink
Hi-DPI Support - Summary Window Font Size
Browse files Browse the repository at this point in the history
.. not sure it needs much more.
  • Loading branch information
liversedge committed Mar 14, 2017
1 parent eb6b717 commit 29854a3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Charts/RideSummaryWindow.cpp
Expand Up @@ -42,6 +42,7 @@
#include "HelpWhatsThis.h"

#include <QtGui>
#include <QDesktopWidget>
#include <QLabel>

#include <QtXml/QtXml>
Expand Down Expand Up @@ -164,7 +165,13 @@ RideSummaryWindow::configChanged(qint32)
#ifdef Q_OS_MAC
rideSummary->settings()->setFontSize(QWebEngineSettings::DefaultFontSize, defaultFont.pointSize()+1);
#else
rideSummary->settings()->setFontSize(QWebEngineSettings::DefaultFontSize, defaultFont.pointSize()+2);
if (dpiXFactor > 1) {
// to avoid upsetting existing code, we only do this for hidpi screens
rideSummary->settings()->setFontSize(QWebEngineSettings::DefaultFontSize, font().pointSize()+2);

} else {
rideSummary->settings()->setFontSize(QWebEngineSettings::DefaultFontSize, defaultFont.pointSize()+2);
}
#endif
rideSummary->settings()->setFontFamily(QWebEngineSettings::StandardFont, defaultFont.family());
#else
Expand Down

0 comments on commit 29854a3

Please sign in to comment.