mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
5b6f468547
commit
60a6b61fb6
1 changed files with 1 additions and 0 deletions
|
@ -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.
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue