# HG changeset patch # User ib # Date 1396009267 0 # Node ID 2d8157b3b3863957929a227b4c2383f71ba82386 # Parent 9402cbe067c8661b801e41db292d9beb4fd6b128 Fix the index passed to PutImage() for item type itVPotmeter. Unlike the position for drawing the button (from bottom to top), the index for the phase image has to be in the usual range, i.e. 0 for 0% and numphases - 1 for 100%, so that the phase image can be designed straightforwardly. Fix the parameter although PutImage() currently doesn't work for item type itVPotmeter at all. diff -r 9402cbe067c8 -r 2d8157b3b386 gui/ui/render.c --- a/gui/ui/render.c Fri Mar 28 12:14:15 2014 +0000 +++ b/gui/ui/render.c Fri Mar 28 12:21:07 2014 +0000 @@ -429,7 +429,7 @@ case itVPotmeter: - PutImage(&item->Bitmap, item->x, item->y, item->numphases, item->numphases * (1.0 - item->value / 100.0)); + PutImage(&item->Bitmap, item->x, item->y, item->numphases, (item->numphases - 1) * (item->value / 100.0)); PutImage(&item->Mask, item->x, item->y + (item->height - item->pheight) * (1.0 - item->value / 100.0), 3, index); break;