-
Notifications
You must be signed in to change notification settings - Fork 181
Open
Description
I'm trying to get a bunch of images into one stack to use them as logos for buttons but they refuse to render past X number of instances depending on the image format.
Code example (excuse the indenting, GitHub isn't great at conserving it):
pub fn main_menu() -> impl IntoView {
let logo= include_bytes!("./assets/logo.png");
let logo2= include_bytes!("./assets/logo2.png");
let logo3 = include_bytes!("./assets/logo3.png");
let logo4= include_bytes!("./assets/logo4.png");
h_stack((
v_stack((
h_stack((
img(move || logo.to_vec()).style(|s| s
.aspect_ratio(1.0)
.size(32, 32)),
label(||"Test1").style(|s| s.selectable(false)),
)),
h_stack((
img(move || logo2.to_vec()).style(|s| s
.aspect_ratio(1.0)
.size(32, 32)),
label(||" Test2"),
)).style(|s| s.items_center().justify_center()),
)).style(|s| s.padding_right(40)),
v_stack((
h_stack((
img(move ||logo3.into()).style(|s| s
.aspect_ratio(1.0)
.size(32, 32)),
label(||"Test3"),
)).style(|s| s.items_center().justify_center().margin_bottom(120)),
h_stack((
img(move ||logo4.to_vec()).style(|s| s
.aspect_ratio(1.0)
.size(32, 32)),
label(||" Test4"),
)).style(|s| s.items_center().justify_center()),
)).style(|s| s.padding_left(40)),
))
.style(|style| {
style
.width_full()
.height_full()
.justify_center()
.items_center()
})
}
The result is the button with only an X number of images depending on the format of the image in question, support for the formats selected is enabled in the crate.
Ideally it would render all images, am I doing something wrong? Please let me know
OS: Windows 11; Rust edition: 2024; Floem version: 0.2.0
Metadata
Metadata
Assignees
Labels
No labels