From 60a6b61fb675fd7455108150c7d7508390785555 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 7 Feb 2021 17:46:47 +0100 Subject: 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 --- stats/barseries.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'stats') 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. } -- cgit v1.2.3-70-g09d2