mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-11-27 15:10:28 -05:00
Multi screen support, with dyn alignment (#2801)
This commit is contained in:
parent
23cabb8b8a
commit
371b6b5079
161 changed files with 4042 additions and 4157 deletions
|
|
@ -222,7 +222,7 @@ class FrequencyKeypadView : public View {
|
|||
|
||||
private:
|
||||
int16_t focused_button = 0;
|
||||
static constexpr int button_w = 240 / 3;
|
||||
int button_w = 240 / 3;
|
||||
static constexpr int button_h = 48;
|
||||
|
||||
static constexpr int mhz_digits = 4;
|
||||
|
|
@ -232,33 +232,33 @@ class FrequencyKeypadView : public View {
|
|||
static constexpr int text_digits = mhz_digits + 1 + submhz_digits;
|
||||
|
||||
Text text_value{
|
||||
{0, 4, screen_width, 16}};
|
||||
{UI_POS_X(0), 4, screen_width, 16}};
|
||||
|
||||
std::array<Button, 12> buttons{};
|
||||
|
||||
Button button_save_ghz{
|
||||
{0, 14 * 16, 80 / 2 - 1, 2 * 16},
|
||||
{UI_POS_X(0), 14 * 16, UI_POS_WIDTH_PERCENT(16) + 1, UI_POS_HEIGHT(2)},
|
||||
"GHz"};
|
||||
Button button_save_khz{
|
||||
{0 + 40 - 1, 14 * 16, 80 / 2, 2 * 16},
|
||||
{UI_POS_X(0) + UI_POS_WIDTH_PERCENT(16) + 1, 14 * 16, UI_POS_WIDTH_PERCENT(16) + 2, UI_POS_HEIGHT(2)},
|
||||
"kHz"};
|
||||
Button button_save_mhz{
|
||||
{0, 16 * 16, 80 - 1, 3 * 16},
|
||||
{UI_POS_X(0), 16 * 16, UI_POS_WIDTH_PERCENT(33), UI_POS_HEIGHT(3)},
|
||||
"Save MHz"};
|
||||
Button button_load{
|
||||
{80 + 1, 14 * 16, 80 - 2, 40},
|
||||
{UI_POS_WIDTH_PERCENT(33) + 1, 14 * 16, UI_POS_WIDTH_PERCENT(33), 40},
|
||||
"Load"};
|
||||
Button button_clear{
|
||||
{80 + 1, 264, 80 - 2, 40},
|
||||
{UI_POS_WIDTH_PERCENT(33) + 1, 264, UI_POS_WIDTH_PERCENT(33), 40},
|
||||
"Clear"};
|
||||
Button button_done_ghz{
|
||||
{160 + 1, 14 * 16, 80 / 2 - 1, 2 * 16},
|
||||
{UI_POS_WIDTH_PERCENT(66) + 1, 14 * 16, UI_POS_WIDTH_PERCENT(16) + 1, UI_POS_HEIGHT(2)},
|
||||
"GHz"};
|
||||
Button button_done_khz{
|
||||
{160 + 40, 14 * 16, 80 / 2 - 1, 2 * 16},
|
||||
{UI_POS_WIDTH_PERCENT(82) + 2, 14 * 16, UI_POS_WIDTH_PERCENT(16) + 2, UI_POS_HEIGHT(2)},
|
||||
"kHz"};
|
||||
Button button_done_mhz{
|
||||
{160 + 1, 16 * 16, 80 - 2, 3 * 16},
|
||||
{UI_POS_WIDTH_PERCENT(66) + 1, 16 * 16, UI_POS_WIDTH_PERCENT(33), UI_POS_HEIGHT(3)},
|
||||
"Done MHz"};
|
||||
|
||||
/* TODO: Template arg required in enum?! */
|
||||
|
|
@ -312,29 +312,29 @@ class FrequencyOptionsView : public View {
|
|||
|
||||
private:
|
||||
Text text_step{
|
||||
{0 * 8, 0 * 16, 4 * 8, 1 * 16},
|
||||
{UI_POS_X(0), UI_POS_Y(0), 4 * 8, 1 * 16},
|
||||
"Step"};
|
||||
|
||||
FrequencyStepView field_step{
|
||||
{5 * 8, 0 * 16},
|
||||
{5 * 8, UI_POS_Y(0)},
|
||||
};
|
||||
|
||||
void on_step_changed(rf::Frequency v);
|
||||
void on_reference_ppm_correction_changed(int32_t v);
|
||||
|
||||
NumberField field_ppm{
|
||||
{23 * 8, 0 * 16},
|
||||
{23 * 8, UI_POS_Y(0)},
|
||||
3,
|
||||
{-99, 99},
|
||||
1,
|
||||
'0',
|
||||
};
|
||||
Text text_ext{
|
||||
{23 * 8, 0 * 16, 3 * 8, 1 * 16},
|
||||
{23 * 8, UI_POS_Y(0), 3 * 8, 1 * 16},
|
||||
"EXT",
|
||||
};
|
||||
Text text_ppm{
|
||||
{27 * 8, 0 * 16, 3 * 8, 16},
|
||||
{27 * 8, UI_POS_Y(0), 3 * 8, 16},
|
||||
"PPM",
|
||||
};
|
||||
};
|
||||
|
|
@ -350,11 +350,11 @@ class RadioGainOptionsView : public View {
|
|||
|
||||
private:
|
||||
Text label_rf_amp{
|
||||
{0 * 8, 0 * 16, 3 * 8, 1 * 16},
|
||||
{UI_POS_X(0), UI_POS_Y(0), 3 * 8, 1 * 16},
|
||||
"Amp"};
|
||||
|
||||
RFAmpField field_rf_amp{
|
||||
{4 * 8, 0 * 16},
|
||||
{4 * 8, UI_POS_Y(0)},
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue