mobile/profile: make the fonts 25% smaller

This will seem too small to many - it's pushing it, but it leads to a
significantly less cluttered profile, and we now have the zoom capability for
readability.

I think this is a nice improvement.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-02-24 06:25:52 -08:00
parent 140d552e6d
commit 1eb8f7cbaa

View file

@ -8,6 +8,8 @@
#include <QScreen>
#include <QElapsedTimer>
const double fontScale = 0.6; // profile looks less cluttered with smaller font
QMLProfile::QMLProfile(QQuickItem *parent) :
QQuickPaintedItem(parent),
m_devicePixelRatio(1.0),
@ -20,7 +22,7 @@ QMLProfile::QMLProfile(QQuickItem *parent) :
setFlags(QQuickItem::ItemClipsChildrenToShape | QQuickItem::ItemHasContents );
m_profileWidget->setProfileState();
m_profileWidget->setPrintMode(true);
m_profileWidget->setFontPrintScale(0.8);
m_profileWidget->setFontPrintScale(fontScale);
connect(QMLManager::instance(), &QMLManager::sendScreenChanged, this, &QMLProfile::screenChanged);
setDevicePixelRatio(QMLManager::instance()->lastDevicePixelRatio());
}
@ -122,7 +124,7 @@ void QMLProfile::setDevicePixelRatio(qreal dpr)
{
if (dpr != m_devicePixelRatio) {
m_devicePixelRatio = dpr;
m_profileWidget->setFontPrintScale(0.8 * dpr);
m_profileWidget->setFontPrintScale(fontScale * dpr);
updateDevicePixelRatio(dpr);
emit devicePixelRatioChanged();
}