Skip to content

Commit

Permalink
feat: start window centered
Browse files Browse the repository at this point in the history
  • Loading branch information
decipher3114 committed Sep 28, 2024
1 parent d57391f commit 1b2ad83
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use iced::{
widget::horizontal_space,
window::{
self, change_mode, close, close_events, gain_focus, icon, settings::PlatformSpecific, Id,
Mode,
Mode, Position,
},
Size, Subscription, Task,
};
Expand Down Expand Up @@ -89,6 +89,7 @@ impl App {
width: 700.0,
height: 430.0,
},
position: Position::Centered,
resizable: false,
icon: Some(icon::from_file_data(ICON, Some(ImageFormat::Png)).unwrap()),
#[cfg(target_os = "macos")]
Expand Down Expand Up @@ -164,10 +165,10 @@ impl App {
}
Some(WindowType::ConfigureWindow(config_window)) => {
self.config.theme = config_window.theme.target().clone();
self.config.update_config()
self.config.update_config();
}
None => (),
}
};
Task::none()
}
AppEvent::ExitApp => {
Expand Down

0 comments on commit 1b2ad83

Please sign in to comment.