1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00

Fixed broken display of graphs with X-axis not starting at 0

This commit is contained in:
Martin Tůma 2021-10-13 20:43:42 +02:00
parent 8d5aa6361f
commit 9cd3f3c4a3

View File

@ -324,8 +324,8 @@ void GraphView::redraw(const QSizeF &size)
updateSliderPosition(); updateSliderPosition();
_info->setPos(QPointF(r.width()/2 - IW(_info)/2 - (IW(_yAxisLabel) _info->setPos(QPointF(r.width()/2 - IW(_info)/2 - (IW(_yAxisLabel)
+ IW(_yAxis))/2, r.top() - IH(_info) - my.height())); + IW(_yAxis))/2 + r.left(), r.top() - IH(_info) - my.height()));
_xAxisLabel->setPos(QPointF(r.width()/2 - IW(_xAxisLabel)/2, _xAxisLabel->setPos(QPointF(r.width()/2 - IW(_xAxisLabel)/2 + r.left(),
r.bottom() + mx.height())); r.bottom() + mx.height()));
_yAxisLabel->setPos(QPointF(r.left() - my.width() - IW(_yAxisLabel), _yAxisLabel->setPos(QPointF(r.left() - my.width() - IW(_yAxisLabel),
r.bottom() - (r.height()/2 + IH(_yAxisLabel)/2))); r.bottom() - (r.height()/2 + IH(_yAxisLabel)/2)));