1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 23:13:13 -04:00

Now we use egui::ColorImage insted of (u32, u32, Vec<u8>)

This commit is contained in:
Konkitoman
2023-09-27 01:06:56 +03:00
parent 449f38adf2
commit 8fad6b761d
3 changed files with 24 additions and 15 deletions

View File

@@ -99,11 +99,12 @@ pub fn window_builder<E>(
.with_maximized(*maximized)
.with_resizable(*resizable)
.with_transparent(*transparent)
.with_window_icon(
icon_data
.clone()
.map(|d| Arc::new((d.width, d.height, d.rgba))),
)
.with_window_icon(icon_data.clone().map(|d| {
Arc::new(egui::ColorImage::from_rgba_premultiplied(
[d.width as usize, d.height as usize],
&d.rgba,
))
}))
.with_active(*active)
// Keep hidden until we've painted something. See https://github.com/emilk/egui/pull/2279
// We must also keep the window hidden until AccessKit is initialized.