mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Fix interpreter ffi build
Commit 738ac0dc01
increased the size of the ImageInner::StaticTextures variant,
which breaks the size assertions in the interpreter ffi build.
This changes fixes that by reducing the size of the ImageInner variant again by
moving all the fields into a separate struct.
This commit is contained in:
parent
0027cab273
commit
f1dae75d53
7 changed files with 29 additions and 23 deletions
|
@ -159,7 +159,7 @@ pub fn generate(doc: &Document) -> TokenStream {
|
|||
quote!(slint::re_exports::Color::from_argb_encoded(0))
|
||||
};
|
||||
quote!(
|
||||
const #symbol: slint::re_exports::ImageInner = slint::re_exports::ImageInner::StaticTextures {
|
||||
const #symbol: slint::re_exports::ImageInner = slint::re_exports::ImageInner::StaticTextures(&slint::re_exports::StaticTextures{
|
||||
size: slint::re_exports::IntSize::new(#width as _, #height as _),
|
||||
original_size: slint::re_exports::IntSize::new(#unscaled_width as _, #unscaled_height as _),
|
||||
data: Slice::from_slice(&[#(#data),*]),
|
||||
|
@ -171,7 +171,7 @@ pub fn generate(doc: &Document) -> TokenStream {
|
|||
index: 0,
|
||||
}
|
||||
])
|
||||
};
|
||||
});
|
||||
)
|
||||
},
|
||||
crate::embedded_resources::EmbeddedResourcesKind::BitmapFontData(crate::embedded_resources::BitmapFont { family_name, character_map, units_per_em, ascent, descent, glyphs }) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue