Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overflow focus not handled correctly on full_refresh=0 #6331

Closed
IB-AST opened this issue Jun 4, 2024 · 3 comments
Closed

Overflow focus not handled correctly on full_refresh=0 #6331

IB-AST opened this issue Jun 4, 2024 · 3 comments
Labels

Comments

@IB-AST
Copy link

IB-AST commented Jun 4, 2024

LVGL version

V8.4.0

What happened?

Background image of icon panel is recolored on focus.

Color of attached label is also recolored on focus, but overflow of label (outside MenuIcon panel) does not.

Increasing panel size leads to layout issue, as background image always seems to be centered or tiled.

lvgl has expected behaviour when unsing full_refresh=1 in source code.

image

How to reproduce?

ui_MenuIcon16 = lv_obj_create(ui_IconPanel4);
lv_obj_remove_style_all(ui_MenuIcon16);
lv_obj_set_width(ui_MenuIcon16, 111);
lv_obj_set_height(ui_MenuIcon16, 75);
lv_obj_set_align(ui_MenuIcon16, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_MenuIcon16, LV_OBJ_FLAG_OVERFLOW_VISIBLE);     /// Flags
lv_obj_clear_flag(ui_MenuIcon16, LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_GESTURE_BUBBLE | LV_OBJ_FLAG_SNAPPABLE |
                  LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_SCROLL_ELASTIC | LV_OBJ_FLAG_SCROLL_MOMENTUM |
                  LV_OBJ_FLAG_SCROLL_CHAIN);     /// Flags
lv_obj_set_style_bg_img_src(ui_MenuIcon16, &ui_img_1770517312, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_object_set_themeable_style_property(ui_MenuIcon16, LV_PART_MAIN | LV_STATE_DEFAULT, LV_STYLE_TEXT_COLOR,
                                       _ui_theme_color_Text);
ui_object_set_themeable_style_property(ui_MenuIcon16, LV_PART_MAIN | LV_STATE_DEFAULT, LV_STYLE_TEXT_OPA,
                                       _ui_theme_alpha_Text);
lv_obj_set_style_blend_mode(ui_MenuIcon16, LV_BLEND_MODE_NORMAL, LV_PART_MAIN | LV_STATE_CHECKED);
ui_object_set_themeable_style_property(ui_MenuIcon16, LV_PART_MAIN | LV_STATE_FOCUSED, LV_STYLE_BG_IMG_RECOLOR,
                                       _ui_theme_color_AccentColor);
ui_object_set_themeable_style_property(ui_MenuIcon16, LV_PART_MAIN | LV_STATE_FOCUSED, LV_STYLE_BG_IMG_RECOLOR_OPA,
                                       _ui_theme_alpha_AccentColor);
ui_object_set_themeable_style_property(ui_MenuIcon16, LV_PART_MAIN | LV_STATE_FOCUSED, LV_STYLE_TEXT_COLOR,
                                       _ui_theme_color_AccentColor);
ui_object_set_themeable_style_property(ui_MenuIcon16, LV_PART_MAIN | LV_STATE_FOCUSED, LV_STYLE_TEXT_OPA,
                                       _ui_theme_alpha_AccentColor);

ui_MenuIconLabel16 = lv_label_create(ui_MenuIcon16);
lv_obj_set_width(ui_MenuIconLabel16, 111);
lv_obj_set_height(ui_MenuIconLabel16, LV_SIZE_CONTENT);    /// 20
lv_obj_set_x(ui_MenuIconLabel16, 0);
lv_obj_set_y(ui_MenuIconLabel16, 12);
lv_obj_set_align(ui_MenuIconLabel16, LV_ALIGN_BOTTOM_MID);
lv_label_set_text(ui_MenuIconLabel16, "Info");
lv_obj_clear_flag(ui_MenuIconLabel16,
                  LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_GESTURE_BUBBLE | LV_OBJ_FLAG_SNAPPABLE | LV_OBJ_FLAG_SCROLLABLE |
                  LV_OBJ_FLAG_SCROLL_ELASTIC | LV_OBJ_FLAG_SCROLL_MOMENTUM | LV_OBJ_FLAG_SCROLL_CHAIN);     /// Flags
lv_obj_set_style_text_align(ui_MenuIconLabel16, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_MenuIconLabel16, &lv_font_montserrat_14, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_object_set_themeable_style_property(ui_MenuIconLabel16, LV_PART_MAIN | LV_STATE_PRESSED, LV_STYLE_TEXT_COLOR,
                                       _ui_theme_color_AccentColor);
ui_object_set_themeable_style_property(ui_MenuIconLabel16, LV_PART_MAIN | LV_STATE_PRESSED, LV_STYLE_TEXT_OPA,
                                       _ui_theme_alpha_AccentColor);
ui_object_set_themeable_style_property(ui_MenuIconLabel16, LV_PART_MAIN | LV_STATE_FOCUSED, LV_STYLE_TEXT_COLOR,
                                       _ui_theme_color_AccentColor);
ui_object_set_themeable_style_property(ui_MenuIconLabel16, LV_PART_MAIN | LV_STATE_FOCUSED, LV_STYLE_TEXT_OPA,
                                       _ui_theme_alpha_AccentColor);
@kisvegabor
Copy link
Member

Hi,

Can you send a simpler (not SquareLine based) code snippet and send the image that you have used, so that I can reproduce the issue?

@lvgl-bot
Copy link

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

@lvgl-bot lvgl-bot added the stale label Jun 23, 2024
@lvgl-bot
Copy link

lvgl-bot commented Jul 4, 2024

As there was no activity here for a while we close this issue. But don't worry, the conversation is still here and you can get back to it at any time.

So feel free to comment if you have remarks or ideas on this topic.

@lvgl-bot lvgl-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants