From b645c9b41790757786852d54def95da9af749c7d Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:30:10 +1030 Subject: [PATCH] Adjust 'About' text width. On M5StickC the version text was clipped. Fix by adding a new line as needed. --- src/FurbleUI.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/FurbleUI.cpp b/src/FurbleUI.cpp index 26c4bb0..feb17f3 100644 --- a/src/FurbleUI.cpp +++ b/src/FurbleUI.cpp @@ -1642,15 +1642,19 @@ void UI::addTransmitPowerMenu(const menu_t &parent) { void UI::addAboutMenu(const menu_t &parent) { menu_t &menu = addMenu(m_AboutStr, NULL, true, parent); lv_obj_t *cont = lv_menu_cont_create(menu.page); - lv_obj_set_height(cont, LV_PCT(100)); + lv_obj_set_size(cont, LV_PCT(100), LV_PCT(100)); lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_align(cont, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER); lv_obj_t *version = lv_label_create(cont); - lv_label_set_text_fmt(version, "Version: %s", FURBLE_VERSION); + lv_obj_set_width(version, LV_PCT(100)); + lv_label_set_long_mode(version, LV_LABEL_LONG_WRAP); + lv_label_set_text_fmt(version, "Version:\n%s", FURBLE_VERSION); lv_obj_t *id = lv_label_create(cont); - lv_label_set_text_fmt(id, "ID: %s", Device::getStringID().c_str()); + lv_obj_set_width(id, LV_PCT(100)); + lv_label_set_long_mode(id, LV_LABEL_LONG_WRAP); + lv_label_set_text_fmt(id, "ID:\n%s", Device::getStringID().c_str()); lv_menu_set_load_page_event(menu.main, menu.button, menu.page); }