Description
I need to design a Roller with width = 35px. All label text displays well except the selected label text. It disappears when Roller width <= 40px.
(I set the Rollder main border = 0).
What MCU/Processor/Board and compiler are you using?
LVGL Version: v9.1
Board: ESP32-S3: The text hidden.
Native Simulator: The text shows.
VSCode PlatformIO
What do you experience?
Using a GUI editor like SLS, I see whenever the Roller width < 40px. the selected label text disappears.
(Any font size, lv_font_montserrat_14 or lv_font_montserrat_34 affected)
Screen size: 480 x 480 px: GUI Editor: selected label text can show.
Screen size: 480 x 480 px: Native Desktop Simulator: selected label text can show.
Screen size: 480 x 480 px: ESP32-S3 board: selected label text hidden.
Screen size: 800 x 480 px: GUI Editor: selected label text hidden.
Code to reproduce
my_roller_1 = lv_roller_create(my_screen_1);
lv_roller_set_options(my_roller_1, "0\n1\n2\n3\n4\n5", LV_ROLLER_MODE_INFINITE);
lv_obj_set_width(my_roller_1, 35);
lv_obj_set_height(my_roller_1, 42);
lv_obj_set_x(my_roller_1, -19);
lv_obj_set_y(my_roller_1, -70);
lv_obj_set_align(my_roller_1, LV_ALIGN_CENTER);
lv_obj_remove_flag(my_roller_1, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_CLICK_FOCUSABLE |
LV_OBJ_FLAG_GESTURE_BUBBLE | LV_OBJ_FLAG_SNAPPABLE); /// Flags
lv_obj_set_style_text_color(my_roller_1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(my_roller_1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(my_roller_1, &lv_font_montserrat_34, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_border_color(my_roller_1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_border_opa(my_roller_1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_border_width(my_roller_1, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(my_roller_1, lv_color_hex(0xFFFFFF), LV_PART_SELECTED | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(my_roller_1, 255, LV_PART_SELECTED | LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(my_roller_1, lv_color_hex(0x000000), LV_PART_SELECTED | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(my_roller_1, 255, LV_PART_SELECTED | LV_STATE_DEFAULT);
lv_obj_set_style_border_color(my_roller_1, lv_color_hex(0x000000), LV_PART_SELECTED | LV_STATE_DEFAULT);
lv_obj_set_style_border_opa(my_roller_1, 255, LV_PART_SELECTED | LV_STATE_DEFAULT);
lv_obj_set_style_border_width(my_roller_1, 2, LV_PART_SELECTED | LV_STATE_DEFAULT);
What do you expect?
Please tell me how to set the Selected Label Text appear for my case Roller width = 35px.