Fixed page header text colors
This commit is contained in:
@@ -45,13 +45,13 @@ class CurveEditWindow : public Page
|
||||
new StaticText(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP, LCD_W - PAGE_TITLE_LEFT,
|
||||
PAGE_LINE_HEIGHT},
|
||||
STR_MENUCURVE, 0, MENU_COLOR);
|
||||
STR_MENUCURVE, 0, FOCUS_COLOR);
|
||||
char s[16];
|
||||
strAppendStringWithIndex(s, STR_CV, index + 1);
|
||||
new StaticText(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP + PAGE_LINE_HEIGHT,
|
||||
LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT},
|
||||
s, 0, MENU_COLOR);
|
||||
s, 0, FOCUS_COLOR);
|
||||
}
|
||||
|
||||
#if LCD_W > LCD_H
|
||||
|
||||
@@ -145,16 +145,16 @@ void GVarRenderer::paint(BitmapBuffer * dc)
|
||||
FlightModeData * fmData = &g_model.flightModeData[lastFlightMode];
|
||||
lastGVar = fmData->gvars[index];
|
||||
coord_t x = drawStringWithIndex(dc, 0, FIELD_PADDING_TOP, STR_GV, index + 1,
|
||||
DEFAULT_COLOR, nullptr, "=");
|
||||
FOCUS_COLOR, nullptr, "=");
|
||||
if (lastGVar > GVAR_MAX) {
|
||||
uint8_t fm = lastGVar - GVAR_MAX - 1;
|
||||
if (fm >= lastFlightMode)
|
||||
fm++;
|
||||
char label[16];
|
||||
getFlightModeString(label, fm + 1);
|
||||
dc->drawSizedText(x, FIELD_PADDING_TOP, label, strlen(label), DEFAULT_COLOR);
|
||||
dc->drawSizedText(x, FIELD_PADDING_TOP, label, strlen(label), FOCUS_COLOR);
|
||||
} else {
|
||||
drawGVarValue(dc, x, FIELD_PADDING_TOP, index, lastGVar, DEFAULT_COLOR);
|
||||
drawGVarValue(dc, x, FIELD_PADDING_TOP, index, lastGVar, FOCUS_COLOR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ void GVarEditWindow::buildHeader(Window * window)
|
||||
new StaticText(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP, LCD_W - PAGE_TITLE_LEFT,
|
||||
PAGE_LINE_HEIGHT},
|
||||
STR_GLOBAL_VAR, 0, DEFAULT_COLOR);
|
||||
STR_GLOBAL_VAR, 0, FOCUS_COLOR);
|
||||
gVarInHeader =
|
||||
new GVarRenderer(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP + PAGE_LINE_HEIGHT,
|
||||
|
||||
@@ -137,8 +137,15 @@ class InputEditWindow: public Page
|
||||
|
||||
void buildHeader(Window * window)
|
||||
{
|
||||
new StaticText(window, {PAGE_TITLE_LEFT, PAGE_TITLE_TOP, LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT}, STR_MENUINPUTS, 0, MENU_COLOR);
|
||||
new StaticText(window, {PAGE_TITLE_LEFT, PAGE_TITLE_TOP + PAGE_LINE_HEIGHT, LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT}, getSourceString(MIXSRC_FIRST_INPUT + input), 0, MENU_COLOR);
|
||||
new StaticText(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP, LCD_W - PAGE_TITLE_LEFT,
|
||||
PAGE_LINE_HEIGHT},
|
||||
STR_MENUINPUTS, 0,FOCUS_COLOR);
|
||||
new StaticText(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP + PAGE_LINE_HEIGHT,
|
||||
LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT},
|
||||
getSourceString(MIXSRC_FIRST_INPUT + input), 0,
|
||||
FOCUS_COLOR);
|
||||
}
|
||||
|
||||
// TODO share this code with MIXER
|
||||
|
||||
@@ -76,12 +76,12 @@ class LogicalSwitchEditPage: public Page
|
||||
new StaticText(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP, LCD_W - PAGE_TITLE_LEFT,
|
||||
PAGE_LINE_HEIGHT},
|
||||
STR_MENULOGICALSWITCHES, 0, MENU_COLOR);
|
||||
STR_MENULOGICALSWITCHES, 0, FOCUS_COLOR);
|
||||
headerSwitchName = new StaticText(
|
||||
window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP + PAGE_LINE_HEIGHT,
|
||||
LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT},
|
||||
getSwitchPositionName(SWSRC_SW1 + index), 0, MENU_COLOR);
|
||||
getSwitchPositionName(SWSRC_SW1 + index), 0, FOCUS_COLOR);
|
||||
}
|
||||
|
||||
void updateLogicalSwitchOneWindow()
|
||||
|
||||
@@ -73,11 +73,11 @@ class MixEditWindow : public Page
|
||||
new StaticText(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP, LCD_W - PAGE_TITLE_LEFT,
|
||||
PAGE_LINE_HEIGHT},
|
||||
STR_MIXES, 0, MENU_COLOR);
|
||||
STR_MIXES, 0, FOCUS_COLOR);
|
||||
new StaticText(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP + PAGE_LINE_HEIGHT,
|
||||
LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT},
|
||||
getSourceString(MIXSRC_CH1 + channel), 0, MENU_COLOR);
|
||||
getSourceString(MIXSRC_CH1 + channel), 0, FOCUS_COLOR);
|
||||
}
|
||||
|
||||
void buildBody(FormWindow *window)
|
||||
|
||||
@@ -42,11 +42,11 @@ class OutputEditWindow : public Page {
|
||||
new StaticText(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP, LCD_W - PAGE_TITLE_LEFT,
|
||||
PAGE_LINE_HEIGHT},
|
||||
STR_MENULIMITS, 0, MENU_COLOR);
|
||||
STR_MENULIMITS, 0, FOCUS_COLOR);
|
||||
new StaticText(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP + PAGE_LINE_HEIGHT,
|
||||
LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT},
|
||||
getSourceString(MIXSRC_CH1 + channel), 0, MENU_COLOR);
|
||||
getSourceString(MIXSRC_CH1 + channel), 0, FOCUS_COLOR);
|
||||
}
|
||||
|
||||
void buildBody(FormWindow * window)
|
||||
|
||||
@@ -71,13 +71,13 @@ class SpecialFunctionEditPage : public Page
|
||||
window, {PAGE_TITLE_LEFT, PAGE_TITLE_TOP, LCD_W - PAGE_TITLE_LEFT, 20},
|
||||
functions == g_model.customFn ? STR_MENUCUSTOMFUNC
|
||||
: STR_MENUSPECIALFUNCS,
|
||||
0, MENU_COLOR);
|
||||
0, FOCUS_COLOR);
|
||||
headerSF = new StaticText(
|
||||
window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP + PAGE_LINE_HEIGHT,
|
||||
LCD_W - PAGE_TITLE_LEFT, 20},
|
||||
(functions == g_model.customFn ? "SF" : "GF") + std::to_string(index),
|
||||
0, MENU_COLOR);
|
||||
0, FOCUS_COLOR);
|
||||
}
|
||||
|
||||
void updateSpecialFunctionOneWindow()
|
||||
|
||||
Reference in New Issue
Block a user