From 8a9d095cb09e8929a5f1586184d938af54b7d2af Mon Sep 17 00:00:00 2001 From: philmoz Date: Tue, 7 May 2024 16:01:07 +1000 Subject: [PATCH] fix(bw): adjust 128x64 layout to accommodate long switch names (#4976) --- radio/src/gui/128x64/view_main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/128x64/view_main.cpp b/radio/src/gui/128x64/view_main.cpp index 0f89b2bd30e..2524d813ce8 100644 --- a/radio/src/gui/128x64/view_main.cpp +++ b/radio/src/gui/128x64/view_main.cpp @@ -597,13 +597,14 @@ void menuMainView(event_t event) 5 * FH + 1, 4, i); } else { - coord_t x = switch_display.col == 0 ? 2 * FW - 2 : 16 * FW + 7; + coord_t x = switch_display.col == 0 ? 3 * FW + 3 : 18 * FW + 1; coord_t y = 33 + switch_display.row * FH; getvalue_t val = getValue(MIXSRC_FIRST_SWITCH + i); + if (val == 0) x -= 1; getvalue_t sw = ((val < 0) ? 3 * i + 1 : ((val == 0) ? 3 * i + 2 : 3 * i + 3)); - drawSwitch(x, y, sw, 0, false); + drawSwitch(x, y, sw, CENTERED, false); } } }