Skip to content

Commit

Permalink
Merge pull request #8 from MaarifaMaarifa/window-logo
Browse files Browse the repository at this point in the history
Window icon
  • Loading branch information
MaarifaMaarifa authored Sep 25, 2023
2 parents eb8543e + 57d151a commit 8bc03c7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Binary file added assets/logos/series-troxide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/gui/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ pub mod fonts {
pub static NOTOSANS_REGULAR_STATIC: &[u8; 556216] =
include_bytes!("../../assets/fonts/NotoSans-Regular.ttf");
}

pub mod logos {
pub static IMG_LOGO: &[u8; 33071] = include_bytes!("../../assets/logos/series-troxide.png");
}
10 changes: 9 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use clap::Parser;
pub mod core;
mod gui;

use iced::{Application, Settings};
use iced::{window, Application, Settings};

fn main() -> anyhow::Result<()> {
let cli_command = core::cli::cli_data::Cli::parse().command;
Expand All @@ -30,7 +30,15 @@ fn main() -> anyhow::Result<()> {

std::thread::spawn(|| core::notifications::TroxideNotify::new()?.run());

let icon =
window::icon::from_file_data(gui::assets::logos::IMG_LOGO, Some(image::ImageFormat::Png))
.ok();

gui::TroxideGui::run(Settings {
window: iced::window::Settings {
icon,
..Default::default()
},
default_text_size: 14.0,
..Default::default()
})?;
Expand Down

0 comments on commit 8bc03c7

Please sign in to comment.