Now the icon property can modify the icon of the windows exe file

This commit is contained in:
2022-05-01 19:59:22 +08:00
parent 1f927cc6ab
commit 46f65e0c7e
5 changed files with 132 additions and 111 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ pub struct WindowAttr {
pub transparent: bool,
pub decorations: bool,
pub always_on_top: bool,
pub window_icon: Option<Icon>,
pub icon: Option<Icon>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
+1 -1
View File
@@ -51,7 +51,7 @@ fn main() -> wry::Result<()> {
true => window_builder.with_fullscreen(Some(Fullscreen::Borderless(None))),
false => window_builder,
};
let window_builder = match res.window_attr.window_icon {
let window_builder = match res.window_attr.icon {
Some(ref icon) => window_builder.with_window_icon(Some(Icon::from_rgba(
icon.rgba.clone(),
icon.width,