Skip to content

Commit 7f20153

Browse files
author
philmoz
committed
Fix layout
1 parent 15bf8ea commit 7f20153

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

radio/src/gui/colorlcd/libui/page.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class SubPage : public Page
8989

9090
Window* setupLine(const char* title, std::function<void(Window*, coord_t, coord_t)> createEdit, coord_t lblYOffset = 0);
9191

92-
static LAYOUT_ORIENTATION(EDT_X, LCD_W * 9 / 20, LCD_W * 8 / 20)
92+
static LAYOUT_SIZE(EDT_X, LCD_W * 9 / 20, LCD_W * 8 / 20)
9393

9494
protected:
9595
coord_t y = 0;

radio/src/gui/colorlcd/radio/radio_setup.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class ControlTextOverride : public StaticText
194194
{
195195
public:
196196
ControlTextOverride(Window* parent, coord_t x, coord_t y, FunctionsActive func) :
197-
StaticText(parent, {x, y + PAD_MEDIUM, 0, 0}, STR_SF_OVERRIDDEN, COLOR_THEME_WARNING_INDEX, FONT_SZ), func(func)
197+
StaticText(parent, {x + XO, y + PAD_MEDIUM, 0, 0}, STR_SF_OVERRIDDEN, COLOR_THEME_WARNING_INDEX, FONT_SZ), func(func)
198198
{
199199
}
200200

@@ -203,7 +203,8 @@ class ControlTextOverride : public StaticText
203203
show(isFunctionActive(func));
204204
}
205205

206-
static LAYOUT_ORIENTATION(FONT_SZ, FONT(STD), FONT(XS))
206+
static LAYOUT_SIZE(FONT_SZ, FONT(STD), FONT(XS))
207+
static LAYOUT_ORIENTATION(XO, PAD_LARGE * 12, PAD_LARGE * 8)
207208

208209
protected:
209210
FunctionsActive func;
@@ -282,7 +283,7 @@ static SetupLineDef soundPageSetupLines[] = {
282283
auto choice = new SourceChoice(parent, {x, y, 0, 0}, MIXSRC_NONE, MIXSRC_LAST_SWITCH,
283284
GET_SET_DEFAULT(g_eeGeneral.volumeSrc), true);
284285
choice->setAvailableHandler(isSourceSwitchOrPotAvailable);
285-
new ControlTextOverride(parent, x + PAD_LARGE * 7, y, FUNCTION_VOLUME);
286+
new ControlTextOverride(parent, x, y, FUNCTION_VOLUME);
286287
}
287288
},
288289
};
@@ -520,7 +521,7 @@ class BacklightPage : public SubPage
520521
auto choice = new SourceChoice(parent, {x, y, 0, 0}, MIXSRC_NONE, MIXSRC_LAST_SWITCH,
521522
GET_SET_DEFAULT(g_eeGeneral.backlightSrc), true);
522523
choice->setAvailableHandler(isSourceSwitchOrPotAvailable);
523-
new ControlTextOverride(parent, x + PAD_LARGE * 7, y, FUNCTION_BACKLIGHT);
524+
new ControlTextOverride(parent, x, y, FUNCTION_BACKLIGHT);
524525
});
525526

526527
// Flash beep

0 commit comments

Comments
 (0)