Skip to content

Commit d6e5df8

Browse files
committed
fix window icon
1 parent b1132e4 commit d6e5df8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/ui/gui.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::{
44
sync::mpsc::{Receiver, Sender},
55
};
66

7-
use egui::{Button, ComboBox, IconData, RichText, Sense, Theme, Vec2};
7+
use egui::{Button, ComboBox, RichText, Sense, Theme, Vec2};
88
use egui_dropdown::DropDownBox;
99
use log::{error, info};
1010
use rfd::{AsyncFileDialog, AsyncMessageDialog, MessageButtons, MessageDialogResult};
@@ -35,14 +35,12 @@ pub async fn run() -> Result<(), InstallerError> {
3535
}
3636

3737
async fn create_window() -> Result<(), InstallerError> {
38+
let data = eframe::icon_data::from_png_bytes(crate::ORNITHE_ICON_BYTES)
39+
.expect("The Ornithe Icon is a valid PNG file");
3840
let options = eframe::NativeOptions {
3941
viewport: egui::ViewportBuilder::default()
4042
.with_inner_size([630.0, 490.0])
41-
.with_icon(IconData {
42-
rgba: crate::ORNITHE_ICON_BYTES.to_vec(),
43-
width: 512,
44-
height: 512,
45-
}),
43+
.with_icon(data),
4644
renderer: eframe::Renderer::Wgpu,
4745
..Default::default()
4846
};

0 commit comments

Comments
 (0)