I have recently started working with gtk-rs for the first time and I'm trying to use an svg file defined in a css file as the background for a box. All my css on my other elements load in perfectly and the properties for the box also load in but the background image won't load.
Is this possible to do in gtk-rs or should I look for another way?
CSS:
entry-box {
background-image: url(dexEntryBackground.svg);
background-position: center center;
background-repeat: no-repeat;
}
GTK-RS:
gtk::Box::builder()
.orientation(Orientation::Horizontal)
.width_request(1290)
.height_request(470)
.css_name("entry-box")
.build();
For the purpose of the POC the file structure is flat so it just looks like:
src/
- dexEntryBackground.svg
- main.rs
- style.css