diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-12-29 09:52:27 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-12-29 09:52:27 -0800 |
commit | 7e2898dfde3255697bec8a8b726c5d2b5458390b (patch) | |
tree | d56de5d7b6328c96c312ca179c91b0f80464f667 /qt-mobile | |
parent | 87f1301f50ecc5d8ea981e413514b27c24baef1c (diff) | |
download | subsurface-7e2898dfde3255697bec8a8b726c5d2b5458390b.tar.gz |
QML UI: scale profile to allow for some visible separation
That small margin makes things look much better.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r-- | qt-mobile/qmlprofile.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qt-mobile/qmlprofile.cpp b/qt-mobile/qmlprofile.cpp index 0a1e13f38..d428364f4 100644 --- a/qt-mobile/qmlprofile.cpp +++ b/qt-mobile/qmlprofile.cpp @@ -51,8 +51,10 @@ void QMLProfile::setDiveId(const QString &diveId) // the scene fills it, then plot the dive on that widget if (firstRun) { firstRun = false; - m_profileWidget->setGeometry(QRect(x(), y(), width(), height())); - profileTransform.scale(width() / 100, height() / 100); + double w = contentsBoundingRect().width(); + double h = contentsBoundingRect().height(); + double m = m_margin; + profileTransform.scale((w - 2 * m) / 100, (h - 2 * m) / 100); } m_profileWidget->setTransform(profileTransform); qDebug() << "effective transformation:" << |