diff --git a/Cargo.lock b/Cargo.lock index 14b820a..76b2324 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2782,7 +2782,7 @@ checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" [[package]] name = "ststat" -version = "0.1.2" +version = "0.1.3" dependencies = [ "active-win-pos-rs", "chrono", diff --git a/Cargo.toml b/Cargo.toml index f9ed986..e74e54f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ststat" -version = "0.1.2" +version = "0.1.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index 9a9dafe..bb17dee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ use crate::settings::get_screen_size; use chrono::{Duration, Local, NaiveDateTime}; use circlevec::CircleVec; use eframe::{ - egui::{self, RichText, ScrollArea, Visuals}, + egui::{self, Label, Layout, RichText, ScrollArea, Visuals}, epaint::Color32, }; use ekko::{Ekko, EkkoResponse}; @@ -342,12 +342,20 @@ impl eframe::App for MyApp { println!("Setup sidebar done"); } - custom_window_frame(ctx, frame, "Sidebar", |ui| { + custom_window_frame(ctx, frame, "STStat", |ui| { if update { refresh_color(ui); } - - ui.label(format!("{}", self.framecount)); + ui.columns(2, |ui| { + ui[0].add(Label::new( + RichText::new(format!("{}", self.framecount)).weak(), + )); + ui[1].with_layout(Layout::right_to_left(eframe::emath::Align::TOP), |ui| { + ui.add(Label::new( + RichText::new(format!("v{}", cargo_crate_version!())).weak(), + )); + }); + }); let now = chrono::Local::now(); ui.vertical_centered(|ui| {