From 1315bbab3d3f6ca7a5b978548a949ad77e98a011 Mon Sep 17 00:00:00 2001 From: Tim-Paik Date: Sun, 1 May 2022 16:55:49 +0800 Subject: [PATCH] Rename window_icon to icon --- neutauri_bundler/src/data.rs | 8 ++++---- neutauri_bundler/src/dev.rs | 2 +- neutauri_runtime/src/data.rs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/neutauri_bundler/src/data.rs b/neutauri_bundler/src/data.rs index ef9e058..c4a4a68 100644 --- a/neutauri_bundler/src/data.rs +++ b/neutauri_bundler/src/data.rs @@ -62,7 +62,7 @@ pub struct Config { pub transparent: bool, pub decorations: bool, pub always_on_top: bool, - pub window_icon: Option, + pub icon: Option, pub spa: bool, pub url: Option, pub html: Option, @@ -90,7 +90,7 @@ pub struct WindowAttr { pub transparent: bool, pub decorations: bool, pub always_on_top: bool, - pub window_icon: Option, + pub icon: Option, } #[derive(Serialize, Deserialize, Clone, Debug)] @@ -244,7 +244,7 @@ impl Default for Config { transparent: false, decorations: true, always_on_top: false, - window_icon: None, + icon: None, spa: false, url: Some("/index.html".into()), html: None, @@ -268,7 +268,7 @@ impl Config { transparent: self.transparent, decorations: self.decorations, always_on_top: self.always_on_top, - window_icon: match &self.window_icon { + icon: match &self.icon { Some(path) => Some(load_icon(path.as_path())?), None => None, }, diff --git a/neutauri_bundler/src/dev.rs b/neutauri_bundler/src/dev.rs index 7a4964a..93504e3 100644 --- a/neutauri_bundler/src/dev.rs +++ b/neutauri_bundler/src/dev.rs @@ -51,7 +51,7 @@ pub fn dev(config_path: String) -> wry::Result<()> { true => window_builder.with_fullscreen(Some(Fullscreen::Borderless(None))), false => window_builder, }; - let window_builder = match config.window_attr()?.window_icon { + let window_builder = match config.window_attr()?.icon { Some(ref icon) => window_builder.with_window_icon(Some(Icon::from_rgba( icon.rgba.clone(), icon.width, diff --git a/neutauri_runtime/src/data.rs b/neutauri_runtime/src/data.rs index 7601b5e..912fb52 100644 --- a/neutauri_runtime/src/data.rs +++ b/neutauri_runtime/src/data.rs @@ -62,7 +62,7 @@ pub struct Config { pub transparent: bool, pub decorations: bool, pub always_on_top: bool, - pub window_icon: Option, + pub icon: Option, pub spa: bool, pub url: Option, pub html: Option, @@ -212,7 +212,7 @@ impl Default for Config { transparent: false, decorations: true, always_on_top: false, - window_icon: None, + icon: None, spa: false, url: Some("/index.html".into()), html: None,