Comments (7)
@akshatvishu Of course you can work on this :-) Feel free to drop by in chat.slint.dev if you have questions! That usually works faster than raising an issue for everything:-)
from slint.
Thanks for your suggestion. I edited the title and description to make it more actionable as an issue in our issue tracker.
To answer the original question: this is not implemented right now.
from slint.
This should be fairly easy to implement.
In the resolving pass, we can detect such URL and store a ImageReference::EmbeddedData instead of ImageReference::AbsolutePath, around here
slint/internal/compiler/passes/resolving.rs
Line 401 in 26c7e08
from slint.
Image {
source: @image-url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==");
}
Compiling slint_redis_camera_view v0.1.0
error: failed to run custom build command for slint_redis_camera_view v0.1.0
Caused by:
process didn't exit successfully: target/debug/build/slint_redis_camera_view-ffd86284a8902f59/build-script-build
(exit status: 101)
--- stderr
error: Cannot find image file data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
--> ui/app.slint:24:21
|
24 | source: @image-url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==");
| ^
thread 'main' panicked at build.rs:2:42:
called Result::unwrap()
on an Err
value: CompileError(["ui/app.slint:24: Cannot find image file data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="])
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
[Finished running. Exit status: 101]
Cargo.toml
[build-dependencies]
slint-build="1.5"
[dependencies]
slint = "1.5"
from slint.
yes of course, this is not yet implemented yet. This is why the issue is tagged as "enhancement" (this is a feature request)
from slint.
yes of course, this is not yet implemented yet. This is why the issue is tagged as "enhancement" (this is a feature request)
Can i work on this?
from slint.
@akshatvishu , sure, thank you.
from slint.
Related Issues (20)
- Andorid 9: panicked with 'java.lang.ClassNotFoundException' HOT 2
- Previewer and compiler crash when aliasing a callback to itself HOT 1
- Bite-sized examples of common patterns in docs recipes
- Rust error "non-primitive cast" with a weird key-pressed handler HOT 3
- Warn on statements that have no effect HOT 1
- Font conguration for embedded fonts for the software renderer on MCU HOT 3
- unexprected index overwrite in for loop HOT 2
- dependent dimension properties shrink/grow preview frame HOT 1
- Text in documentation is cutoff. HOT 1
- No example in C++ documentation for SortModel, FilterModel, ...
- SortModel::reset() has an infinite recursion HOT 2
- Android Build with JDK21 fails with java.lang.NullPointerException on SlintAndroidJavaHelper HOT 2
- TabWidget: Tab hover event not working when using Qt backend HOT 2
- Widgets react to all mouse buttons when using Qt backend HOT 1
- ListView items that are not visible are not focusable through tabbing. HOT 1
- `TouchArea`: `has-hover` does not make sense for touch events HOT 1
- Broken font rendering HOT 1
- slint is not working on dietpi OS on Raspberry pi 4 with 8GB RAM HOT 2
- [RFC] Text stroke/outline support HOT 3
- C++ filter model: defer first execution of filter function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slint.