mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
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:
parent
03f45febe2
commit
724c5bd8d9
Notes:
sideshowbarker
2024-07-19 02:20:46 +09:00
Author: https://github.com/linusg
Commit: 724c5bd8d9
Pull-request: https://github.com/SerenityOS/serenity/pull/3543
Issue: https://github.com/SerenityOS/serenity/issues/3540
Reviewed-by: https://github.com/nico
Reviewed-by: https://github.com/tomuta
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ private:
|
||||||
for (auto value : m_history) {
|
for (auto value : m_history) {
|
||||||
painter.draw_line(
|
painter.draw_line(
|
||||||
{ rect.x() + i, rect.bottom() },
|
{ 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);
|
m_graph_color);
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue