aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-02-07 17:46:47 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-02-08 08:19:48 -0800
commit60a6b61fb675fd7455108150c7d7508390785555 (patch)
tree20e94081a675c687439eabb97e04fc5a73701b8b
parent5b6f4685475be7f7b68375fcab465c1626950296 (diff)
downloadsubsurface-60a6b61fb675fd7455108150c7d7508390785555.tar.gz
statistics: fix placement of horizontal labels in bar charts
The subtraction of half the label width, needed for centered labels, must have been lost somewhere. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--stats/barseries.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/stats/barseries.cpp b/stats/barseries.cpp
index 252f05af6..9e8d5d133 100644
--- a/stats/barseries.cpp
+++ b/stats/barseries.cpp
@@ -151,6 +151,7 @@ void BarSeries::BarLabel::updatePosition(bool horizontal, bool center, const QRe
setVisible(false);
return;
}
+ pos.rx() -= itemSize.width() / 2.0;
}
item->setPos(roundPos(pos)); // Round to integer to avoid ugly artifacts.
}