mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
compiler: Do not fail the embed_images pass with URLs
Slintpad uses URLs to images. Do not fail when we "embed" those so that we find the list of resources on the Documents later. This fixes image loading in slintpad again.
This commit is contained in:
parent
30ef606d04
commit
7f8da7bf28
4 changed files with 13 additions and 3 deletions
|
@ -2971,6 +2971,9 @@ fn generate_resources(doc: &Document) -> Vec<TokenStream> {
|
|||
.map(|(path, er)| {
|
||||
let symbol = format_ident!("SLINT_EMBEDDED_RESOURCE_{}", er.id);
|
||||
match &er.kind {
|
||||
&crate::embedded_resources::EmbeddedResourcesKind::ListOnly => {
|
||||
quote!()
|
||||
},
|
||||
crate::embedded_resources::EmbeddedResourcesKind::RawData => {
|
||||
let data = embedded_file_tokens(path);
|
||||
quote!(static #symbol: &'static [u8] = #data;)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue