mirror of https://github.com/Tim-Paik/neutauri.git
Rename window_icon to icon
This commit is contained in:
parent
f3e9f6e936
commit
084fe40035
|
@ -62,7 +62,7 @@ pub struct Config {
|
||||||
pub transparent: bool,
|
pub transparent: bool,
|
||||||
pub decorations: bool,
|
pub decorations: bool,
|
||||||
pub always_on_top: bool,
|
pub always_on_top: bool,
|
||||||
pub window_icon: Option<PathBuf>,
|
pub icon: Option<PathBuf>,
|
||||||
pub spa: bool,
|
pub spa: bool,
|
||||||
pub url: Option<String>,
|
pub url: Option<String>,
|
||||||
pub html: Option<PathBuf>,
|
pub html: Option<PathBuf>,
|
||||||
|
@ -90,7 +90,7 @@ pub struct WindowAttr {
|
||||||
pub transparent: bool,
|
pub transparent: bool,
|
||||||
pub decorations: bool,
|
pub decorations: bool,
|
||||||
pub always_on_top: bool,
|
pub always_on_top: bool,
|
||||||
pub window_icon: Option<Icon>,
|
pub icon: Option<Icon>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||||
|
@ -244,7 +244,7 @@ impl Default for Config {
|
||||||
transparent: false,
|
transparent: false,
|
||||||
decorations: true,
|
decorations: true,
|
||||||
always_on_top: false,
|
always_on_top: false,
|
||||||
window_icon: None,
|
icon: None,
|
||||||
spa: false,
|
spa: false,
|
||||||
url: Some("/index.html".into()),
|
url: Some("/index.html".into()),
|
||||||
html: None,
|
html: None,
|
||||||
|
@ -268,7 +268,7 @@ impl Config {
|
||||||
transparent: self.transparent,
|
transparent: self.transparent,
|
||||||
decorations: self.decorations,
|
decorations: self.decorations,
|
||||||
always_on_top: self.always_on_top,
|
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())?),
|
Some(path) => Some(load_icon(path.as_path())?),
|
||||||
None => None,
|
None => None,
|
||||||
},
|
},
|
||||||
|
|
|
@ -51,7 +51,7 @@ pub fn dev(config_path: String) -> wry::Result<()> {
|
||||||
true => window_builder.with_fullscreen(Some(Fullscreen::Borderless(None))),
|
true => window_builder.with_fullscreen(Some(Fullscreen::Borderless(None))),
|
||||||
false => window_builder,
|
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(
|
Some(ref icon) => window_builder.with_window_icon(Some(Icon::from_rgba(
|
||||||
icon.rgba.clone(),
|
icon.rgba.clone(),
|
||||||
icon.width,
|
icon.width,
|
||||||
|
|
|
@ -62,7 +62,7 @@ pub struct Config {
|
||||||
pub transparent: bool,
|
pub transparent: bool,
|
||||||
pub decorations: bool,
|
pub decorations: bool,
|
||||||
pub always_on_top: bool,
|
pub always_on_top: bool,
|
||||||
pub window_icon: Option<PathBuf>,
|
pub icon: Option<PathBuf>,
|
||||||
pub spa: bool,
|
pub spa: bool,
|
||||||
pub url: Option<String>,
|
pub url: Option<String>,
|
||||||
pub html: Option<PathBuf>,
|
pub html: Option<PathBuf>,
|
||||||
|
@ -212,7 +212,7 @@ impl Default for Config {
|
||||||
transparent: false,
|
transparent: false,
|
||||||
decorations: true,
|
decorations: true,
|
||||||
always_on_top: false,
|
always_on_top: false,
|
||||||
window_icon: None,
|
icon: None,
|
||||||
spa: false,
|
spa: false,
|
||||||
url: Some("/index.html".into()),
|
url: Some("/index.html".into()),
|
||||||
html: None,
|
html: None,
|
||||||
|
|
Loading…
Reference in New Issue