mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 20:36:15 +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);
|
setVisible(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
pos.rx() -= itemSize.width() / 2.0;
|
||||||
}
|
}
|
||||||
item->setPos(roundPos(pos)); // Round to integer to avoid ugly artifacts.
|
item->setPos(roundPos(pos)); // Round to integer to avoid ugly artifacts.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue