Skip to content

Commit

Permalink
fix(bw): adjust 128x64 layout to accommodate long switch names (#4976)
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz authored and pfeerick committed May 7, 2024
1 parent ec215b6 commit 8a9d095
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions radio/src/gui/128x64/view_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 8a9d095

Please sign in to comment.