summaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-24 06:25:52 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-25 10:17:57 -0800
commit1eb8f7cbaa0b71732baf1a6e560c8ed51e4ad09a (patch)
tree4dd6a4b2335f31fe6b74152ce36a7a303f3b69ac /profile-widget
parent140d552e6da0d275eacffa0e2719a8e0a9801b92 (diff)
downloadsubsurface-1eb8f7cbaa0b71732baf1a6e560c8ed51e4ad09a.tar.gz
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>
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/qmlprofile.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/profile-widget/qmlprofile.cpp b/profile-widget/qmlprofile.cpp
index 52ac799ca..733ee4633 100644
--- a/profile-widget/qmlprofile.cpp
+++ b/profile-widget/qmlprofile.cpp
@@ -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();
}