Skip to content

Commit

Permalink
fix(color): setup dialog for pots on portrait LCD has overlapping text (
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz authored Jan 25, 2025
1 parent 81a469a commit fa5dea6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion radio/src/gui/colorlcd/radio/hw_inputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ HWPots::HWPots(Window* parent) :
pot->setAvailableHandler([=](int val) { return isPotTypeAvailable(val); });

auto tgl = new ToggleSwitch(
this, rect_t{P_INV_X, P_Y(i) + P_OFST_Y + yo, P_INV_W, 0},
this, rect_t{P_INV_X, P_Y(i) + yo, P_INV_W, 0},
[=]() -> uint8_t { return (uint8_t)getPotInversion(i); },
[=](int8_t newValue) {
setPotInversion(i, newValue);
Expand Down
6 changes: 3 additions & 3 deletions radio/src/gui/colorlcd/radio/hw_inputs.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ struct HWPots : public Window
// in a flex layout
static LAYOUT_VAL(P_LBL_X, 0, 0)
static LAYOUT_VAL(P_LBL_W, (DIALOG_DEFAULT_WIDTH - 45) * 2 / 11, (DIALOG_DEFAULT_WIDTH - 18) * 13 / 21)
static constexpr coord_t P_NM_X = P_LBL_X + P_LBL_W + PAD_MEDIUM;
static LAYOUT_VAL(P_NM_X, P_LBL_X + P_LBL_W + PAD_MEDIUM, 100);
static LAYOUT_VAL(P_NM_W, 70, 70)
static LAYOUT_VAL(P_TYP_X, P_NM_X + P_NM_W, 0)
static LAYOUT_VAL(P_TYP_X, P_NM_X + P_NM_W, 32)
static LAYOUT_VAL(P_TYP_W, 160, P_LBL_W)
static constexpr coord_t P_INV_X = P_TYP_X + P_TYP_W + PAD_MEDIUM;
static LAYOUT_VAL(P_INV_X, P_TYP_X + P_TYP_W + PAD_MEDIUM, P_NM_X + P_NM_W + PAD_MEDIUM)
static LAYOUT_VAL(P_INV_W, 52, 52)
static LAYOUT_VAL(P_ROW_H, 36, 72)
static LAYOUT_VAL(P_OFST_Y, 0, 36)
Expand Down

0 comments on commit fa5dea6

Please sign in to comment.