ResourceGraph: Fix graph line position calculation

The calculation was only taking the rect's inner height, but not its top
offset into account.

Fixes #3540.
This commit is contained in:
Linus Groh 2020-09-18 21:13:26 +01:00 committed by Andreas Kling
parent 03f45febe2
commit 724c5bd8d9
Notes: sideshowbarker 2024-07-19 02:20:46 +09:00

View file

@ -104,7 +104,7 @@ private:
for (auto value : m_history) {
painter.draw_line(
{ rect.x() + i, rect.bottom() },
{ rect.x() + i, (int)(rect.height() - (value * (float)rect.height())) },
{ rect.x() + i, rect.top() + (int)(round(rect.height() - (value * rect.height()))) },
m_graph_color);
++i;
}