Fine-tuned NV14 UI spacing.

This commit is contained in:
Richard Li
2021-08-19 13:08:57 +08:00
parent 9f498e5ec4
commit 784b3c5ab6
+22 -18
View File
@@ -39,6 +39,7 @@ enum FontIndex
FONT_XXL_INDEX,
#endif
// this one MUST be last
FONTS_COUNT
};
@@ -47,12 +48,12 @@ typedef uint16_t pixel_t;
constexpr bool WRAP_FORM_FIELDS_WITHIN_PAGE = true;
constexpr short SLIDE_SPEED_REDUCTION = 5;
constexpr uint32_t MENU_HEADER_BUTTON_WIDTH = 60;
constexpr uint32_t MENU_HEADER_BUTTONS_LEFT = MENU_HEADER_BUTTON_WIDTH;
constexpr uint32_t MENU_HEADER_BUTTON_WIDTH = 33;
constexpr uint32_t MENU_HEADER_BUTTONS_LEFT = 47;
constexpr uint32_t MENU_HEADER_HEIGHT = 60;
constexpr uint32_t MENU_TITLE_TOP = 61;
constexpr uint32_t MENU_TITLE_HEIGHT = 22;
constexpr uint32_t MENU_HEADER_HEIGHT = 45;
constexpr uint32_t MENU_TITLE_TOP = 48;
constexpr uint32_t MENU_TITLE_HEIGHT = 21;
constexpr uint32_t MENU_BODY_TOP = MENU_TITLE_TOP + MENU_TITLE_HEIGHT;
constexpr uint32_t MENU_CONTENT_TOP = MENU_BODY_TOP + 1;
constexpr uint32_t MENU_FOOTER_HEIGHT = 0;
@@ -60,9 +61,9 @@ constexpr uint32_t MENU_FOOTER_TOP = LCD_H - MENU_FOOTER_HEIGHT;
constexpr uint32_t MENU_BODY_HEIGHT = MENU_FOOTER_TOP - MENU_BODY_TOP;
constexpr uint32_t MENUS_MARGIN_LEFT = 6;
constexpr coord_t PAGE_PADDING = 8;
constexpr uint32_t PAGE_LINE_HEIGHT = 26;
constexpr uint32_t PAGE_LINE_SPACING = 6;
constexpr coord_t PAGE_PADDING = 6;
constexpr uint32_t PAGE_LINE_HEIGHT = 20;
constexpr uint32_t PAGE_LINE_SPACING = 2;
constexpr uint32_t PAGE_INDENT_WIDTH = 10;
constexpr uint32_t PAGE_LABEL_WIDTH = 140;
constexpr uint32_t FH = PAGE_LINE_HEIGHT;
@@ -70,7 +71,7 @@ constexpr uint32_t NUM_BODY_LINES = MENU_BODY_HEIGHT / PAGE_LINE_
constexpr uint32_t TEXT_VIEWER_LINES = (MENU_FOOTER_TOP - MENU_HEADER_HEIGHT) / FH;
constexpr uint32_t FIELD_PADDING_LEFT = 3;
constexpr uint32_t FIELD_PADDING_TOP = 4;
constexpr uint32_t FIELD_PADDING_TOP = 2;
constexpr uint32_t CURVE_SIDE_WIDTH = 100;
constexpr uint32_t CURVE_CENTER_X = LCD_W - CURVE_SIDE_WIDTH - 7;
@@ -79,12 +80,15 @@ constexpr uint32_t CURVE_COORD_WIDTH = 36;
constexpr uint32_t CURVE_COORD_HEIGHT = 17;
constexpr uint32_t DATETIME_SEPARATOR_X = LCD_W - 53;
constexpr uint32_t DATETIME_LINE1 = 9;
constexpr uint32_t DATETIME_LINE2 = 23;
constexpr uint32_t DATETIME_MIDDLE = (LCD_W + DATETIME_SEPARATOR_X + 4) / 2;
constexpr uint32_t DATETIME_LINE1 = 7;
constexpr uint32_t DATETIME_LINE2 = 22;
constexpr uint32_t DATETIME_MIDDLE = (LCD_W + DATETIME_SEPARATOR_X + 1) / 2;
constexpr uint32_t MENUS_TOOLBAR_BUTTON_WIDTH = 50;
constexpr uint32_t MENUS_TOOLBAR_BUTTON_PADDING = 11;
constexpr uint32_t RSSI_X = LCD_W - 80;
constexpr uint32_t AUDIO_X = LCD_W - 115;
constexpr uint32_t MENUS_TOOLBAR_BUTTON_WIDTH = 30;
constexpr uint32_t MENUS_TOOLBAR_BUTTON_PADDING = 3;
constexpr uint32_t ALERT_FRAME_TOP = 70;
constexpr uint32_t ALERT_FRAME_HEIGHT = (LCD_H - 2 * ALERT_FRAME_TOP);
@@ -98,8 +102,8 @@ constexpr uint32_t ALERT_MESSAGE_LEFT = 15;
constexpr uint32_t ALERT_ACTION_TOP = 240;
constexpr uint32_t ALERT_BUTTON_TOP = 300;
constexpr uint32_t PAGE_TITLE_TOP = 4;
constexpr uint32_t PAGE_TITLE_LEFT = 70;
constexpr uint32_t PAGE_TITLE_TOP = 2;
constexpr uint32_t PAGE_TITLE_LEFT = 50;
/*enum LcdColorIndex
{
@@ -156,9 +160,9 @@ constexpr coord_t INPUT_EDIT_CURVE_TOP = MENU_HEADER_HEIGHT;
constexpr coord_t MENUS_LINE_HEIGHT = 40;
constexpr coord_t MENUS_WIDTH = 200;
constexpr coord_t MENUS_OFFSET_TOP = 20;
constexpr coord_t POPUP_HEADER_HEIGHT = 40;
constexpr coord_t POPUP_HEADER_HEIGHT = 30;
constexpr coord_t MENUS_MIN_HEIGHT = 2 * MENUS_LINE_HEIGHT - 1;
constexpr coord_t MENUS_MAX_HEIGHT = 8 * MENUS_LINE_HEIGHT - 1;
constexpr coord_t MENUS_MAX_HEIGHT = 7 * MENUS_LINE_HEIGHT - 1;
constexpr rect_t MENUS_TOOLBAR_RECT = { 35, (LCD_H - MENUS_MAX_HEIGHT) / 2, 50, MENUS_MAX_HEIGHT };