Commit 444c6f60 authored by Radek Polak's avatar Radek Polak

gta04 charging graph - fix drawing charge near top of screen - second try

parent 535e873e
......@@ -301,7 +301,9 @@ void NeoControl::paintEvent(QPaintEvent *)
int secs = dtMin.secsTo(dt);
int x2 = (w * secs) / totalSecs;
int y2 = h - (6 * h * charge) / (chargeMax * 7);
int y2 = (h * charge) / chargeMax;
y2 = h - (5 * y2 / 6); // flip y and add 1/6 for charge value text
// Draw time on x axis
if (abs(x2 - hourTextX) > 5 * fontW) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment