mirror of
				https://github.com/Tim-Paik/neutauri.git
				synced 2024-10-12 23:29:41 +00:00 
			
		
		
		
	Rename window_icon to icon
This commit is contained in:
		| @ -62,7 +62,7 @@ pub struct Config { | ||||
|     pub transparent: bool, | ||||
|     pub decorations: bool, | ||||
|     pub always_on_top: bool, | ||||
|     pub window_icon: Option<PathBuf>, | ||||
|     pub icon: Option<PathBuf>, | ||||
|     pub spa: bool, | ||||
|     pub url: Option<String>, | ||||
|     pub html: Option<PathBuf>, | ||||
| @ -90,7 +90,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)] | ||||
| @ -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, | ||||
|             }, | ||||
|  | ||||
| @ -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, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user