Skip to content

Commit 4bac620

Browse files
load icon
1 parent f3a1dda commit 4bac620

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

desktop/src/native_window.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,17 @@ impl NativeWindowHandle {
3939
} else {
4040
let x11_window = WindowAttributesX11::default().with_name(APP_ID, APP_NAME);
4141
window.with_platform_attributes(Box::new(x11_window))
42+
};
43+
}
44+
45+
#[cfg(target_os = "windows")]
46+
{
47+
if let Ok(win_icon) = winit::platform::windows::WinIcon::from_resource(1, None) {
48+
let icon = winit::icon::Icon(std::sync::Arc::new(win_icon));
49+
window = window.with_window_icon(Some(icon));
4250
}
4351
}
52+
4453
window
4554
}
4655
#[allow(unused_variables)]

0 commit comments

Comments
 (0)