Skip to content

Commit

Permalink
add app id for icon
Browse files Browse the repository at this point in the history
  • Loading branch information
darrell-roberts committed Dec 29, 2024
1 parent 9e01eb0 commit f63e030
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions minesweeper-iced/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use iced::{time, Subscription, Theme};
use iced::{time, window, Subscription, Theme};
use minesweeper::model::GameState;
use minesweeper_iced::{AppMsg, AppState};
use std::time::Duration;
Expand All @@ -9,7 +9,6 @@ fn main() -> iced::Result {

fn launch() -> iced::Result {
iced::application("Minesweeper", AppState::update, AppState::view)
.window_size((1024., 1124.))
.subscription(|state| {
if matches!(state.board.state(), GameState::Active) {
time::every(Duration::from_secs(1)).map(|_| AppMsg::Tick)
Expand All @@ -18,5 +17,14 @@ fn launch() -> iced::Result {
}
})
.theme(|_state| Theme::Dark)
.window(window::Settings {
size: (1024., 1124.).into(),
#[cfg(target_os = "linux")]
platform_specific: window::settings::PlatformSpecific {
application_id: "minesweeper".into(),
..Default::default()
},
..Default::default()
})
.run_with(AppState::new)
}

0 comments on commit f63e030

Please sign in to comment.