mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:03:23 +00:00
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>
This commit is contained in:
parent
87f1301f50
commit
7e2898dfde
1 changed files with 4 additions and 2 deletions
|
@ -51,8 +51,10 @@ void QMLProfile::setDiveId(const QString &diveId)
|
||||||
// the scene fills it, then plot the dive on that widget
|
// the scene fills it, then plot the dive on that widget
|
||||||
if (firstRun) {
|
if (firstRun) {
|
||||||
firstRun = false;
|
firstRun = false;
|
||||||
m_profileWidget->setGeometry(QRect(x(), y(), width(), height()));
|
double w = contentsBoundingRect().width();
|
||||||
profileTransform.scale(width() / 100, height() / 100);
|
double h = contentsBoundingRect().height();
|
||||||
|
double m = m_margin;
|
||||||
|
profileTransform.scale((w - 2 * m) / 100, (h - 2 * m) / 100);
|
||||||
}
|
}
|
||||||
m_profileWidget->setTransform(profileTransform);
|
m_profileWidget->setTransform(profileTransform);
|
||||||
qDebug() << "effective transformation:" <<
|
qDebug() << "effective transformation:" <<
|
||||||
|
|
Loading…
Add table
Reference in a new issue