Переглянути джерело

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.
Linus Groh 4 роки тому
батько
коміт
724c5bd8d9
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      MenuApplets/ResourceGraph/main.cpp

+ 1 - 1
MenuApplets/ResourceGraph/main.cpp

@@ -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;
         }