rust-lang / crates.io

The Rust package registry
https://crates.io
Apache License 2.0
2.93k stars 597 forks source link

Problem with Image source at https #7686

Closed richardmcatlin closed 9 months ago

richardmcatlin commented 9 months ago

Current Behavior

Trying to use https as source for Image. Works in SlintPad, but get compile error with cargo and wasm.

Expected Behavior

This works in SlintPad, but does not compile for cargo project.

export component Example inherits Window {
    in property <image> url1: @image-url("https://upload.wikimedia.org/wikipedia/commons/4/42/Berlin_potsdamer_platz.jpg");
    width: 200px;
    height: 150px;
    VerticalLayout {
        Image {
            source: url1;
            width: 200px;
            // implicit default, preserving aspect ratio:
            // height: self.width * natural_height / natural_width;
        }
    }
}

error: Cannot find image file https://upload.wikimedia.org/wikipedia/commons/4/42/Berlin_potsdamer_platz.jpg --> /Users/rhettcatlin/Desktop/catlin/rust/rust_fullstack_on_aws_serverless/client_slint_puzzle/slide_puzzle.slint:112:31 | 112 | in property url1: @image-url("https://upload.wikimedia.org/wikipedia/commons/4/42/Berlin_potsdamer_platz.jpg");

Steps To Reproduce

No response

Environment

Anything else?

No response

Turbo87 commented 9 months ago

you might want to report this to the slint project (https://github.com/slint-ui/slint) instead of crates.io 😉