Skip to content

Commit

Permalink
v0.1.3: Change window title, add version, make framecount weak
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisheib committed Apr 12, 2023
1 parent f38c451 commit 359ba04
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 12 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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| {
Expand Down

0 comments on commit 359ba04

Please sign in to comment.