diff --git a/src/main.rs b/src/main.rs index ccd281f..0ea56da 100755 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,9 @@ use iced::theme::{self, Theme}; use iced::widget::{button, column, row, text}; use iced::widget::{text_input, TextInput}; -use iced::{Alignment, Color, Element, Length, Sandbox, Settings}; +use iced::{window, Alignment, Color, Element, Length, Sandbox, Settings, Size}; + +use git_version::git_version; mod my_theme; use my_theme::{get_theme, FromHexColor, OneDark}; @@ -12,8 +14,23 @@ use search_bar::*; mod message; use message::*; +// Static string to get the git hash +pub const GIT_HASH: &'static str = git_version!(); + pub fn main() -> iced::Result { - Counter::run(Settings::default()) + let settings: Settings<()> = Settings { + window: window::Settings { + size: Size { + width: 800.0, + height: 600.0, + }, + resizable: false, + decorations: true, + ..window::Settings::default() + }, + ..Default::default() + }; + Counter::run(settings) } struct AppSettings { @@ -44,7 +61,7 @@ impl Sandbox for Counter { } fn title(&self) -> String { - String::from("Counter - Iced") + format!("TFTool - {}", GIT_HASH) } fn update(&mut self, message: Message) {