From 84662a8fab261e27ba81467e250b3737d656dfd0 Mon Sep 17 00:00:00 2001 From: suchmememanyskill <38142618+suchmememanyskill@users.noreply.github.com> Date: Thu, 23 Nov 2023 11:58:10 +0100 Subject: [PATCH] Make sure the macro name doesn't overflow --- CYD-Klipper/src/ui/panels/macros_panel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CYD-Klipper/src/ui/panels/macros_panel.cpp b/CYD-Klipper/src/ui/panels/macros_panel.cpp index 804c135..16348fb 100644 --- a/CYD-Klipper/src/ui/panels/macros_panel.cpp +++ b/CYD-Klipper/src/ui/panels/macros_panel.cpp @@ -41,6 +41,8 @@ void create_macro_widget(const char* macro, lv_obj_t* root_panel){ lv_obj_t * label = lv_label_create(panel); lv_label_set_text(label, macro); lv_obj_align(label, LV_ALIGN_LEFT_MID, 0, 0); + lv_label_set_long_mode(label, LV_LABEL_LONG_SCROLL_CIRCULAR); + lv_obj_set_width(label, (TFT_HEIGHT - 40) * 0.75f); lv_obj_t * btn = lv_btn_create(panel); lv_obj_align(btn, LV_ALIGN_RIGHT_MID, 0, 0);