feat(core): add logo no-background

This commit is contained in:
Federico Terzi 2021-06-13 17:16:57 +02:00
parent 5e4840fd34
commit 2cba576084
3 changed files with 8 additions and 0 deletions

View File

@ -61,6 +61,9 @@ fn launcher_main(args: CliModuleArgs) -> i32 {
window_icon_path: icon_paths
.wizard_icon
.map(|path| path.to_string_lossy().to_string()),
welcome_image_path: icon_paths
.logo_no_background
.map(|path| path.to_string_lossy().to_string()),
accessibility_image_1_path: None,
accessibility_image_2_path: None,
handlers: WizardHandlers {

View File

@ -22,6 +22,7 @@ use log::{debug, info};
use std::path::{Path, PathBuf};
const ICON_BINARY: &[u8] = include_bytes!("res/icon.png");
const LOGO_NO_BACKGROUND_BINARY: &[u8] = include_bytes!("res/logo_no_background.png");
#[cfg(target_os = "windows")]
const WINDOWS_NORMAL_DARK_ICO_BINARY: &[u8] = include_bytes!("res/windows/normal_dark.ico");
@ -49,6 +50,7 @@ pub struct IconPaths {
pub tray_icon_system_disabled: Option<PathBuf>, // TODO: secure input
pub logo: Option<PathBuf>,
pub logo_no_background: Option<PathBuf>,
}
#[cfg(target_os = "windows")]
@ -60,6 +62,7 @@ pub fn load_icon_paths(runtime_dir: &Path) -> Result<IconPaths> {
tray_icon_normal: Some(extract_icon(WINDOWS_NORMAL_DARK_ICO_BINARY, &runtime_dir.join("normal.ico"))?),
tray_icon_disabled: Some(extract_icon(WINDOWS_DISABLED_DARK_ICO_BINARY, &runtime_dir.join("disabled.ico"))?),
logo: Some(extract_icon(ICON_BINARY, &runtime_dir.join("icon.png"))?),
logo_no_background: Some(extract_icon(LOGO_NO_BACKGROUND_BINARY, &runtime_dir.join("icon_no_background.png"))?),
..Default::default()
})
}
@ -72,6 +75,7 @@ pub fn load_icon_paths(runtime_dir: &Path) -> Result<IconPaths> {
tray_icon_disabled: Some(extract_icon(MAC_DISABLED_BINARY, &runtime_dir.join("disabled.png"))?),
tray_icon_system_disabled: Some(extract_icon(MAC_SYSTEM_DISABLED_BINARY, &runtime_dir.join("systemdisabled.png"))?),
logo: Some(extract_icon(ICON_BINARY, &runtime_dir.join("icon.png"))?),
logo_no_background: Some(extract_icon(LOGO_NO_BACKGROUND_BINARY, &runtime_dir.join("icon_no_background.png"))?),
..Default::default()
})
}
@ -81,6 +85,7 @@ pub fn load_icon_paths(runtime_dir: &Path) -> Result<IconPaths> {
Ok(IconPaths {
logo: Some(extract_icon(ICON_BINARY, &runtime_dir.join("icon.png"))?),
search_icon: Some(extract_icon(ICON_BINARY, &runtime_dir.join("search.png"))?),
logo_no_background: Some(extract_icon(LOGO_NO_BACKGROUND_BINARY, &runtime_dir.join("icon_no_background.png"))?),
..Default::default()
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB