profile: vertical center mean depth label

This label is put to the right of the corresponding curve,
so it should arguably be centered vertically. At least to
me this looks more natural.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-11-13 18:55:28 +01:00 committed by Dirk Hohndel
parent 176a62f752
commit 8ff949650a

View file

@ -517,7 +517,7 @@ void DiveMeanDepthItem::createTextItem(double lastSec, double lastMeanDepth)
{
qDeleteAll(texts);
texts.clear();
DiveTextItem *text = new DiveTextItem(dpr, diveMeanDepthItemLabelScale, Qt::AlignRight | Qt::AlignTop, this);
DiveTextItem *text = new DiveTextItem(dpr, diveMeanDepthItemLabelScale, Qt::AlignRight | Qt::AlignVCenter, this);
text->set(get_depth_string(lrint(lastMeanDepth), true), getColor(TEMP_TEXT));
text->setPos(QPointF(hAxis.posAtValue(lastSec) + dpr, vAxis.posAtValue(lastMeanDepth)));
texts.append(text);