Diagnostic screen proper alignment for narrow screen.
This commit is contained in:
@@ -40,8 +40,13 @@ class RadioAnalogsDiagsWindow: public Window {
|
||||
void paint(BitmapBuffer * dc) override
|
||||
{
|
||||
for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {
|
||||
coord_t y = 1 + (i / 2) * FH;
|
||||
uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10;
|
||||
#if LCD_W > LCD_H
|
||||
coord_t y = 1 + (i / 2) * FH;
|
||||
uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10;
|
||||
#else
|
||||
coord_t y = 1 + i * FH;
|
||||
uint8_t x = 10;
|
||||
#endif
|
||||
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT, 2);
|
||||
dc->drawText(x + 2 * 15 - 2, y, ":");
|
||||
drawHexNumber(dc, x + 3 * 15 - 1, y, anaIn(i));
|
||||
|
||||
Reference in New Issue
Block a user