-
Notifications
You must be signed in to change notification settings - Fork 798
swapped red and blue channels because it was messed up in the first PR #10331
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
base: master
Are you sure you want to change the base?
Conversation
|
Hi @sandreas . thanks for the patch. I'm wondering: doesn't from_rgb() need to be adjusted as well? And if yes, isn't the the implementation identical with Xrgb888? If it is, then I suppose one type could be removed. What do you think? |
Thank you for the quick feedback. Probably you're right. First I was just trying to fix that slint somehow reported the BA24 Renderer (which turned out to internally by Unfortunately it took a while until I noticed that the colors were switched - first I thought it had to do something with dark mode (which I was experimenting with at the time). So I think I need to test this on the device I'm working with to ensure not patching the wrong thing (see https://github.com/sandreas/rust-slint-riscv64-musl-demo?tab=readme-ov-file#hardware). This might take some days, I'll report back. |
|
An alias makes sense, or a more generic name (bgra8888 and we just also use it for the kernel's xrgb) Anyway, take your time to test it on the device:) |
…th a match clause
|
@tronical However, now everything seems to work with an alias and I removed a lot of duplicated code. I don't know why I did not notice that an alias is enough in the first place - well, I learned a lot of Rust in the last weeks :-) Screenshot with test images and rectangles that show it is now working as expected: |




This is a follow up for #9914 which somehow seems to have messed up the red and blue channel (see attached screenshot vs the original image).
I hope this fixes the problem - I'm going to do more research if it does not.