diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-02-07 17:46:47 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-02-08 08:19:48 -0800 |
commit | 60a6b61fb675fd7455108150c7d7508390785555 (patch) | |
tree | 20e94081a675c687439eabb97e04fc5a73701b8b /stats | |
parent | 5b6f4685475be7f7b68375fcab465c1626950296 (diff) | |
download | subsurface-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>
Diffstat (limited to 'stats')
-rw-r--r-- | stats/barseries.cpp | 1 |
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. } |