From 0f9c9a8725c260df7ecc58bd481477c8ecc54071 Mon Sep 17 00:00:00 2001 From: 3djc Date: Sun, 16 Aug 2020 17:20:06 +0200 Subject: [PATCH] Do not display too many horintals on x7 screen This fixes #7854 --- radio/src/gui/128x64/widgets.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/radio/src/gui/128x64/widgets.cpp b/radio/src/gui/128x64/widgets.cpp index 36c31d3fd..505ba057f 100644 --- a/radio/src/gui/128x64/widgets.cpp +++ b/radio/src/gui/128x64/widgets.cpp @@ -67,7 +67,11 @@ void drawVerticalScrollbar(coord_t x, coord_t y, coord_t h, uint16_t offset, uin void drawGauge(coord_t x, coord_t y, coord_t w, coord_t h, int32_t val, int32_t max) { +#if !defined(PCBX7) // X7 LCD doesn't like too many horizontal lines lcdDrawRect(x, y, w+1, h); +#else + h++; +#endif lcdDrawFilledRect(x+1, y+1, w-1, 4, SOLID, ERASE); coord_t len = limit((uint8_t)1, uint8_t((abs(val) * w/2 + max/2) / max), uint8_t(w/2)); coord_t x0 = (val>0) ? x+w/2 : x+1+w/2-len;