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

fix(imagebutton): clipped area of mid part #5849

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

liamHowatt
Copy link
Collaborator

@liamHowatt liamHowatt commented Mar 12, 2024

Description of the feature or fix

Discovered while debugging issue #5803
Related to PR #5719

Before

image

After

image

When a sub clip of the mid part of the imagebutton is redrawn it draws it with respect to the top-left-corner because the clip coords are passed to lv_draw_image instead of the image part coords. Can be reproduced with lv_example_imagebutton_1 and the play/pause button of lv_demo_music by moving something off of the mid part, such as a mouse cursor image.

Also, I'm not sure why, but the first draw of the mid part is also wrong too on my simulator only when I use COLOR_DEPTH 24 or 32, but fine for 16:
image
(fixed by these changes)
Edit: this was because of partial render mode

Notes

Copy link
Member

@kisvegabor kisvegabor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you for the fix!

@kisvegabor
Copy link
Member

kisvegabor commented Mar 13, 2024

Hm, something is not okay with the tests. I don't think it's related though.

@W-Mai
Copy link
Contributor

W-Mai commented Mar 13, 2024

It's weird. The log is missing.

@kisvegabor
Copy link
Member

It seems it's stuck an infinite loop somewhere. Works well locally.

Running the CI again, maybe just a temporal issue.

@kisvegabor
Copy link
Member

Yep, temporal issue. All passed now.

@kisvegabor kisvegabor merged commit 5c01851 into lvgl:master Mar 16, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants