mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-25 17:25:10 +03:00
Cosmetics
This commit is contained in:
parent
381b54a56f
commit
950a526551
1 changed files with 13 additions and 5 deletions
|
@ -39,21 +39,28 @@ constexpr uint8_t COLUMN2_X = 10 * FW;
|
||||||
void menuRadioFirmwareOptions(event_t event)
|
void menuRadioFirmwareOptions(event_t event)
|
||||||
{
|
{
|
||||||
title(STR_MENU_FIRM_OPTIONS);
|
title(STR_MENU_FIRM_OPTIONS);
|
||||||
|
|
||||||
coord_t y = MENU_HEADER_HEIGHT + 1;
|
coord_t y = MENU_HEADER_HEIGHT + 1;
|
||||||
lcdNextPos = INDENT_WIDTH;
|
lcdNextPos = INDENT_WIDTH;
|
||||||
|
|
||||||
for (uint8_t i=0; options[i]; i++) {
|
for (uint8_t i=0; options[i]; i++) {
|
||||||
const char * option = options[i];
|
const char * option = options[i];
|
||||||
coord_t width = getTextWidth(option);
|
|
||||||
|
|
||||||
if((lcdNextPos + 5 + width) > LCD_W) {
|
if (i > 0) {
|
||||||
lcdDrawText(lcdNextPos, y, ",");
|
lcdDrawText(lcdNextPos, y, ", ");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcdNextPos + getTextWidth(option) + 5 > LCD_W) {
|
||||||
lcdNextPos = INDENT_WIDTH;
|
lcdNextPos = INDENT_WIDTH;
|
||||||
y += FH;
|
y += FH;
|
||||||
}
|
}
|
||||||
if (i > 0 && lcdNextPos !=INDENT_WIDTH)
|
|
||||||
lcdDrawText(lcdNextPos, y, ", ");
|
|
||||||
lcdDrawText(lcdNextPos, y, option);
|
lcdDrawText(lcdNextPos, y, option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event == EVT_KEY_BREAK(KEY_EXIT)) {
|
||||||
|
popMenu();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PXX2)
|
#if defined(PXX2)
|
||||||
|
@ -185,6 +192,7 @@ void menuRadioModulesVersion(event_t event)
|
||||||
if (lines > NUM_BODY_LINES) {
|
if (lines > NUM_BODY_LINES) {
|
||||||
drawVerticalScrollbar(LCD_W-1, FH, LCD_H-FH, menuVerticalOffset, lines, NUM_BODY_LINES);
|
drawVerticalScrollbar(LCD_W-1, FH, LCD_H-FH, menuVerticalOffset, lines, NUM_BODY_LINES);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(event) {
|
switch(event) {
|
||||||
case EVT_KEY_PREVIOUS_LINE:
|
case EVT_KEY_PREVIOUS_LINE:
|
||||||
if (lines > NUM_BODY_LINES) {
|
if (lines > NUM_BODY_LINES) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue