소스 검색

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