-
Notifications
You must be signed in to change notification settings - Fork 676
Menu: Add icon property #8182
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?
Menu: Add icon property #8182
Conversation
Thanks for this much appreciated patch. Looks like the CI is failing in the C++ tests.
This is because the builtin struct now contain an image. This header is generated in Line 119 in ec1e125
#include <slint_image.h> there.
Also the muda implementation in muda.rs is missing. |
b557f29
to
595cfa5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looks good to me.
The CI seems to expose more problem with missing include in some of our headers
31cc983
to
0f3b1fd
Compare
This adds an icon that is displayed to the left of the title, and is also shown for Menus are inside of a parent menu. Closes slint-ui#7791
0f3b1fd
to
bcb05d9
Compare
Looking at the PR again, it looks like there are still some issue in the generated headers. |
Absolutely! I have no idea what I'm doing in the C++ part of Slint, so I'm just putting in stuff blind |
After adding an Image in a builtin struct, some code and include need to be moved a bit around
I've fixed the
The problem is because Image constains a CacheKey which contains a u64, and so can't be put in a SharedVector because struct for which alignment is bigger than the alignment of the helper data. slint/internal/core/graphics/image.rs Line 293 in a176a55
Option include:
Option 2. is the easier, @tronical: do you think it is safe? |
The usize holds a pointer, so u64 is ok for now. |
Use u32 for the timestamp store as the cache key, this is enough precision so that there is no practical risk of ducplicates And remove the Path from no_std as this is not used in this version
This adds an icon that is displayed to the left of the title, and is also shown for Menus are inside of a parent menu.
Closes #7791