From af861497b6906bca69c72f55b941de668ab3611e Mon Sep 17 00:00:00 2001 From: philmoz Date: Thu, 20 Jun 2024 15:33:01 +1000 Subject: [PATCH] Fix rebase. --- radio/src/gui/colorlcd/fullscreen_dialog.h | 16 ++++++++-------- radio/src/gui/colorlcd/model_curves.h | 2 +- radio/src/gui/colorlcd/model_flightmodes.cpp | 2 +- radio/src/gui/colorlcd/model_telemetry.cpp | 2 +- radio/src/gui/colorlcd/model_usbjoystick.cpp | 16 ++++++++-------- radio/src/gui/colorlcd/radio_diaganas.cpp | 4 ++-- .../gui/colorlcd/radio_ghost_module_config.cpp | 4 ++-- radio/src/gui/colorlcd/radio_sdmanager.h | 4 ++-- radio/src/gui/colorlcd/sourcechoice.cpp | 2 +- radio/src/gui/colorlcd/tabsgroup.cpp | 8 ++++---- radio/src/gui/colorlcd/theme_manager.h | 8 ++++---- radio/src/gui/colorlcd/view_channels.cpp | 4 ++-- radio/src/gui/colorlcd/view_logical_switches.h | 1 + radio/src/gui/colorlcd/view_main_menu.h | 4 ++-- 14 files changed, 39 insertions(+), 38 deletions(-) diff --git a/radio/src/gui/colorlcd/fullscreen_dialog.h b/radio/src/gui/colorlcd/fullscreen_dialog.h index bc0962d95e1..e08024d9a37 100644 --- a/radio/src/gui/colorlcd/fullscreen_dialog.h +++ b/radio/src/gui/colorlcd/fullscreen_dialog.h @@ -58,14 +58,14 @@ class FullScreenDialog : public Window void closeDialog(); - static LAYOUT_VAL(ALERT_FRAME_TOP, 50, 70) - static LAYOUT_VAL(ALERT_FRAME_HEIGHT, LCD_H - 120, LCD_H - 2 * ALERT_FRAME_TOP) - static LAYOUT_VAL(ALERT_BITMAP_TOP, ALERT_FRAME_TOP + 25, ALERT_FRAME_TOP + 15) - static LAYOUT_VAL(ALERT_BITMAP_LEFT, 20, 15) - static LAYOUT_VAL(ALERT_TITLE_TOP, ALERT_FRAME_TOP + 5, ALERT_FRAME_TOP + 10) - static LAYOUT_VAL(ALERT_TITLE_LEFT, 146, 140) - static LAYOUT_VAL(ALERT_MESSAGE_TOP, ALERT_TITLE_TOP + 85, ALERT_TITLE_TOP + 130) - static LAYOUT_VAL(ALERT_MESSAGE_LEFT, ALERT_TITLE_LEFT, 15) + static LAYOUT_VAL(ALERT_FRAME_TOP, 50, 70, LS(50)) + static LAYOUT_VAL(ALERT_FRAME_HEIGHT, LCD_H - 120, LCD_H - 2 * ALERT_FRAME_TOP, LCD_H - LS(120)) + static LAYOUT_VAL(ALERT_BITMAP_TOP, ALERT_FRAME_TOP + 25, ALERT_FRAME_TOP + 15, ALERT_FRAME_TOP +LS(25)) + static LAYOUT_VAL(ALERT_BITMAP_LEFT, 20, 15, LS(20)) + static LAYOUT_VAL(ALERT_TITLE_TOP, ALERT_FRAME_TOP + 5, ALERT_FRAME_TOP + 10, ALERT_FRAME_TOP + LS(5)) + static LAYOUT_VAL(ALERT_TITLE_LEFT, 146, 140, LS(146)) + static LAYOUT_VAL(ALERT_MESSAGE_TOP, ALERT_TITLE_TOP + 85, ALERT_TITLE_TOP + 130, ALERT_TITLE_TOP + LS(85)) + static LAYOUT_VAL(ALERT_MESSAGE_LEFT, ALERT_TITLE_LEFT, 15, ALERT_TITLE_LEFT) protected: uint8_t type; diff --git a/radio/src/gui/colorlcd/model_curves.h b/radio/src/gui/colorlcd/model_curves.h index 55371a089e4..26f880dfbff 100644 --- a/radio/src/gui/colorlcd/model_curves.h +++ b/radio/src/gui/colorlcd/model_curves.h @@ -34,7 +34,7 @@ class ModelCurvesPage : public PageTab virtual void build(Window* window) override; - static LAYOUT_VAL(PER_ROW, 3, 2) + static LAYOUT_VAL(PER_ROW, 3, 2, LS(3)) protected: uint8_t focusIndex = -1; diff --git a/radio/src/gui/colorlcd/model_flightmodes.cpp b/radio/src/gui/colorlcd/model_flightmodes.cpp index efa5577249e..da04151c5e1 100644 --- a/radio/src/gui/colorlcd/model_flightmodes.cpp +++ b/radio/src/gui/colorlcd/model_flightmodes.cpp @@ -194,7 +194,7 @@ class FlightModeEdit : public Page } } - static LAYOUT_VAL(TRIMS_PER_LINE, 2, 1) + static LAYOUT_VAL(TRIMS_PER_LINE, 2, 1, 2) protected: uint8_t index; diff --git a/radio/src/gui/colorlcd/model_telemetry.cpp b/radio/src/gui/colorlcd/model_telemetry.cpp index 922cdcead3e..8e4200a04b7 100644 --- a/radio/src/gui/colorlcd/model_telemetry.cpp +++ b/radio/src/gui/colorlcd/model_telemetry.cpp @@ -800,7 +800,7 @@ class SensorEditWindow : public SubPage updateSensorParameters(); } - static LAYOUT_VAL(NUM_EDIT_W, 100, 80) + static LAYOUT_VAL(NUM_EDIT_W, 100, 80, LS(100)) }; ModelTelemetryPage::ModelTelemetryPage() : diff --git a/radio/src/gui/colorlcd/model_usbjoystick.cpp b/radio/src/gui/colorlcd/model_usbjoystick.cpp index 03607b153bf..f623632268d 100644 --- a/radio/src/gui/colorlcd/model_usbjoystick.cpp +++ b/radio/src/gui/colorlcd/model_usbjoystick.cpp @@ -82,7 +82,7 @@ class USBChannelEditStatusBar : public Window channel, true); } - static LAYOUT_VAL(USBCH_EDIT_STATUS_BAR_MARGIN, 3, 0) + static LAYOUT_VAL(USBCH_EDIT_STATUS_BAR_MARGIN, 3, 0, LS(3)) protected: ComboChannelBar* channelBar; @@ -215,9 +215,9 @@ class USBChannelEditWindow : public Page buildBody(body); } - static LAYOUT_VAL(USBCH_EDIT_STATUS_BAR_WIDTH, 250, 160) - static LAYOUT_VAL(USBCH_EDIT_RIGHT_MARGIN, 0, 3) - static LAYOUT_VAL(USBCH_COLS, 4, 2) + static LAYOUT_VAL(USBCH_EDIT_STATUS_BAR_WIDTH, 250, 160, LS(250)) + static LAYOUT_VAL(USBCH_EDIT_RIGHT_MARGIN, 0, 3, 0) + static LAYOUT_VAL(USBCH_COLS, 4, 2, 4) protected: uint8_t channel; @@ -488,10 +488,10 @@ class USBChannelLineButton : public ListLineButton bool isActive() const override { return false; } - static LAYOUT_VAL(USBCH_LINE_HEIGHT, 32, 48) - static LAYOUT_VAL(USBCH_CHN_ROWS, 1, 2) - static LAYOUT_VAL(USBCH_BTN_MODE_COL, 4, 2) - static LAYOUT_VAL(USBCH_BTN_MODE_ROW, 0, 1) + static LAYOUT_VAL(USBCH_LINE_HEIGHT, 32, 48, LS(32)) + static LAYOUT_VAL(USBCH_CHN_ROWS, 1, 2, 1) + static LAYOUT_VAL(USBCH_BTN_MODE_COL, 4, 2, 4) + static LAYOUT_VAL(USBCH_BTN_MODE_ROW, 0, 1, 0) protected: bool init = false; diff --git a/radio/src/gui/colorlcd/radio_diaganas.cpp b/radio/src/gui/colorlcd/radio_diaganas.cpp index 117a547927e..d14355facc2 100644 --- a/radio/src/gui/colorlcd/radio_diaganas.cpp +++ b/radio/src/gui/colorlcd/radio_diaganas.cpp @@ -242,7 +242,7 @@ class AnaCalibratedViewWindow : public AnaViewWindow } #endif - static LAYOUT_VAL(TSI2CEventsCol, 5, 0) + static LAYOUT_VAL(TSI2CEventsCol, 5, 0, 5) protected: #if defined(HARDWARE_TOUCH) @@ -448,7 +448,7 @@ class AnaMinMaxViewWindow : public AnaViewWindow AnaViewWindow::checkEvents(); } - static LAYOUT_VAL(GRIDCOLS, 10, 5) + static LAYOUT_VAL(GRIDCOLS, 10, 5, 10) }; class AnaCalibratedViewPage : public PageTab diff --git a/radio/src/gui/colorlcd/radio_ghost_module_config.cpp b/radio/src/gui/colorlcd/radio_ghost_module_config.cpp index 8058938497d..a0f551c9560 100644 --- a/radio/src/gui/colorlcd/radio_ghost_module_config.cpp +++ b/radio/src/gui/colorlcd/radio_ghost_module_config.cpp @@ -59,8 +59,8 @@ class GhostModuleConfigWindow : public Window } } - static LAYOUT_VAL(xOffset, 140, 20) - static LAYOUT_VAL(xOffset2, 260, 140) + static LAYOUT_VAL(xOffset, 140, 20, LS(140)) + static LAYOUT_VAL(xOffset2, 260, 140, LS(260)) protected: StaticText* menuLines[GHST_MENU_LINES][2]; diff --git a/radio/src/gui/colorlcd/radio_sdmanager.h b/radio/src/gui/colorlcd/radio_sdmanager.h index db4c54d9736..454bc00cca9 100644 --- a/radio/src/gui/colorlcd/radio_sdmanager.h +++ b/radio/src/gui/colorlcd/radio_sdmanager.h @@ -38,8 +38,8 @@ class RadioSdManagerPage : public PageTab RadioSdManagerPage(); void build(Window* window) override; - static LAYOUT_VAL(PREVIEW_W, LCD_W * 2 / 5 - PAD_SMALL * 2, LCD_W - PAD_MEDIUM * 2) - static LAYOUT_VAL(PREVIEW_H, LCD_H - 68, (LCD_H - 68) / 3) + static LAYOUT_VAL(PREVIEW_W, LCD_W * 2 / 5 - PAD_SMALL * 2, LCD_W - PAD_MEDIUM * 2, LCD_W * 2 / 5 - PAD_SMALL * 2) + static LAYOUT_VAL(PREVIEW_H, LCD_H - 68, (LCD_H - 68) / 3, LCD_H - LS(68)) protected: void fileAction(const char* path, const char* name, const char* fullpath); diff --git a/radio/src/gui/colorlcd/sourcechoice.cpp b/radio/src/gui/colorlcd/sourcechoice.cpp index bb90710fdbc..92aa05ef190 100644 --- a/radio/src/gui/colorlcd/sourcechoice.cpp +++ b/radio/src/gui/colorlcd/sourcechoice.cpp @@ -142,7 +142,7 @@ class SourceChoiceMenuToolbar : public MenuToolbar } } - static LAYOUT_VAL(FILTER_COLUMNS, 3, 2) + static LAYOUT_VAL(FILTER_COLUMNS, 3, 2, LS(3)) protected: #if defined(HARDWARE_TOUCH) diff --git a/radio/src/gui/colorlcd/tabsgroup.cpp b/radio/src/gui/colorlcd/tabsgroup.cpp index 9ce91adf470..e65e8c45afb 100644 --- a/radio/src/gui/colorlcd/tabsgroup.cpp +++ b/radio/src/gui/colorlcd/tabsgroup.cpp @@ -220,10 +220,10 @@ class TabsGroupHeader : public Window bool isCurrent(uint8_t idx) const { return currentIndex == idx; } uint8_t tabCount() const { return buttons.size(); } - static LAYOUT_VAL(DATE_XO, 48, 48) - static LAYOUT_VAL(DATE_Y, 6, 6) - static LAYOUT_VAL(MENU_HEADER_BUTTON_WIDTH, 33, 33) - static LAYOUT_VAL(HDR_DATE_FULL_WIDTH, 51, 51) + static LAYOUT_VAL(DATE_XO, 48, 48, LS(48)) + static LAYOUT_VAL(DATE_Y, 6, 6, LS(6)) + static LAYOUT_VAL(MENU_HEADER_BUTTON_WIDTH, 33, 33, LS(33)) + static LAYOUT_VAL(HDR_DATE_FULL_WIDTH, 51, 51, LS(51)) protected: uint8_t currentIndex = 0; diff --git a/radio/src/gui/colorlcd/theme_manager.h b/radio/src/gui/colorlcd/theme_manager.h index 2b7eb9b73f8..e5a99300c38 100644 --- a/radio/src/gui/colorlcd/theme_manager.h +++ b/radio/src/gui/colorlcd/theme_manager.h @@ -165,9 +165,9 @@ class HeaderDateTime : public Window void setColor(uint32_t color); - static LAYOUT_VAL(HDR_DATE_WIDTH, 45, 45) - static LAYOUT_VAL(HDR_DATE_HEIGHT, 12, 12) - static LAYOUT_VAL(HDR_DATE_LINE2, 15, 15) + static LAYOUT_VAL(HDR_DATE_WIDTH, 45, 45,LS(45)) + static LAYOUT_VAL(HDR_DATE_HEIGHT, 12, 12, LS(12)) + static LAYOUT_VAL(HDR_DATE_LINE2, 15, 15, LS(15)) protected: lv_obj_t *date = nullptr; @@ -188,7 +188,7 @@ class UsbSDConnected : public Window public: UsbSDConnected(); - static LAYOUT_VAL(HDR_DATE_Y, 6, 6) + static LAYOUT_VAL(HDR_DATE_Y, 6, 6, LS(6)) protected: HeaderDateTime* dateTime = nullptr; diff --git a/radio/src/gui/colorlcd/view_channels.cpp b/radio/src/gui/colorlcd/view_channels.cpp index d8c59741bdc..f1c8b29629f 100644 --- a/radio/src/gui/colorlcd/view_channels.cpp +++ b/radio/src/gui/colorlcd/view_channels.cpp @@ -64,8 +64,8 @@ class ChannelsViewFooter : public Window STR_MONITOR_MIXER_DESC, COLOR_THEME_PRIMARY2); } - static LAYOUT_VAL(LEG_COLORBOX, 14, 14) - static LAYOUT_VAL(TXT_H, 18, 18) + static LAYOUT_VAL(LEG_COLORBOX, 14, 14, LS(14)) + static LAYOUT_VAL(TXT_H, 18, 18, LS(18)) }; //----------------------------------------------------------------------------- diff --git a/radio/src/gui/colorlcd/view_logical_switches.h b/radio/src/gui/colorlcd/view_logical_switches.h index ac15479df07..7457fa99fad 100644 --- a/radio/src/gui/colorlcd/view_logical_switches.h +++ b/radio/src/gui/colorlcd/view_logical_switches.h @@ -31,6 +31,7 @@ class LogicalSwitchesViewPage : public PageTab LogicalSwitchesViewPage(); static LAYOUT_VAL(FOOTER_HEIGHT, 20, 40, LS(20)) + static LAYOUT_VAL(BTN_WIDTH, 57, 76, LS(57)) static LAYOUT_VAL(BTN_HEIGHT, 20, 21, 18) static LAYOUT_VAL(BTN_MATRIX_COL, 8, 4, 8) diff --git a/radio/src/gui/colorlcd/view_main_menu.h b/radio/src/gui/colorlcd/view_main_menu.h index 057a14ca09c..e7b42f290c1 100644 --- a/radio/src/gui/colorlcd/view_main_menu.h +++ b/radio/src/gui/colorlcd/view_main_menu.h @@ -32,8 +32,8 @@ class ViewMainMenu : public Window void onClicked() override; void deleteLater(bool detach = true, bool trash = true) override; - static LAYOUT_VAL(QM_COLS, 4, 3) - static LAYOUT_VAL(QM_ROWS, 2, 3) + static LAYOUT_VAL(QM_COLS, 4, 3, 4) + static LAYOUT_VAL(QM_ROWS, 2, 3, 2) protected: std::function closeHandler = nullptr;