Skip to content

Commit

Permalink
Fix portrait LCD layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Mitchell committed Apr 27, 2024
1 parent 39d83af commit 2620ce1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 7 additions & 2 deletions radio/src/gui/colorlcd/model_gvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@

#define SET_DIRTY() storageDirty(EE_MODEL)

LAYOUT_VAL3(BTN_H, 38, 26, (modelFMEnabled() ? 72 : 38))
LAYOUT_VAL3(GVAR_NM_Y, 7, 4, (modelFMEnabled() ? 24 : 7))
#if PORTRAIT_LCD
#define BTN_H (modelFMEnabled() ? 72 : 38)
#define GVAR_NM_Y (modelFMEnabled() ? 24 : 7)
#else
LAYOUT_VAL3(BTN_H, 38, 26, 0)
LAYOUT_VAL3(GVAR_NM_Y, 7, 4, 0)
#endif
LAYOUT_VAL2(GVAR_VAL_W, 45, 50)
LAYOUT_VAL1(GVAR_NAME_SIZE, 44)

Expand Down
9 changes: 5 additions & 4 deletions radio/src/gui/colorlcd/model_outputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ LAYOUT_VAL1(CH_BAR_HEIGHT, 16)
LAYOUT_VAL2(CH_LINE_H, 32, 50)
LAYOUT_VAL3(MIN_Y, 4, 2, 2)
LAYOUT_VAL2(MAX_W, 52, 60)
#define OFF_Y MIN_Y
LAYOUT_VAL3(OFF_Y, MIN_Y, MIN_Y, 24)
LAYOUT_VAL2(OFF_W, 44, 52)
#define BAR_Y PAD_MEDIUM

Expand Down Expand Up @@ -231,6 +231,10 @@ ModelOutputsPage::ModelOutputsPage() :
{
}

#define ADD_TRIMS_X PAD_MEDIUM
#define ADD_TRIMS_Y PAD_SMALL
#define ADD_TRIMS_H UI_ELEMENT_HEIGHT

LAYOUT_VAL3(ADD_TRIMS_W, (LCD_W / 2) - 10, (LCD_W / 2) - 7, LCD_W - 12)
LAYOUT_VAL2(EXLIM_Y, 10, ADD_TRIMS_X + ADD_TRIMS_H + 8)
LAYOUT_VAL2(EXLIMCB_Y, 4, ADD_TRIMS_X + ADD_TRIMS_H + 2)
Expand All @@ -241,9 +245,6 @@ LAYOUT_VAL2(EXLIMCB_Y, 4, ADD_TRIMS_X + ADD_TRIMS_H + 2)
#define EXLIM_X 6
#endif

#define ADD_TRIMS_X PAD_MEDIUM
#define ADD_TRIMS_Y PAD_SMALL
#define ADD_TRIMS_H UI_ELEMENT_HEIGHT
#define EXLIM_W (EXLIMCB_X - EXLIM_X - PAD_SMALL)
LAYOUT_VAL1(EXLIM_H, 20)
LAYOUT_VAL1(EXLIM_XO, 58)
Expand Down

0 comments on commit 2620ce1

Please sign in to comment.