mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: don't place labels at half-integer values
Placing labels at half-integer values gives horrible rendering artifacts. Therefore, always round to integer values. The easiest way to do this is right before setting the position. Introduce a helper function to round QPointF in such scenarios. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
f1203d365a
commit
5b6f468547
7 changed files with 31 additions and 12 deletions
|
|
@ -397,8 +397,8 @@ void StatsView::updateTitlePos()
|
|||
{
|
||||
if (!title)
|
||||
return;
|
||||
title->setPos(QPointF(round(sceneBorder + (boundingRect().width() - title->getRect().width()) / 2.0),
|
||||
round(sceneBorder)));
|
||||
QPointF pos(sceneBorder + (boundingRect().width() - title->getRect().width()) / 2.0, sceneBorder);
|
||||
title->setPos(roundPos(pos));
|
||||
}
|
||||
|
||||
template <typename T, class... Args>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue