From 9396c5d8e70723eecfde0172103f08b72a4cb3ae Mon Sep 17 00:00:00 2001 From: Volkor <me@volkor.me> Date: Fri, 14 Feb 2025 17:33:46 +1100 Subject: [PATCH] clean up node and about --- src/gui/widgets/about.rs | 16 +++------------- src/gui/widgets/node_list.rs | 29 +---------------------------- 2 files changed, 4 insertions(+), 41 deletions(-) diff --git a/src/gui/widgets/about.rs b/src/gui/widgets/about.rs index 5e76fd5..3d34b74 100644 --- a/src/gui/widgets/about.rs +++ b/src/gui/widgets/about.rs @@ -1,8 +1,5 @@ -use core::f32; - -use egui::{text::TextWrapping, Color32, Label, RichText, Separator}; -use egui_tiles::UiResponse; -use crate::{built_info, gui::Pane}; +use egui::{Color32, Label, RichText}; +use crate::built_info; /// Shows information about the program. /// you know, the normal boring stuff @@ -17,7 +14,7 @@ pub fn about_ui(ui: &mut egui::Ui) { // Show cool ascii logo // TODO: make this not wrap or truncate with ... // double TODO: replace the logo with a cool ascii art of actual yams (vegetable) with text - let mut cool_logo = RichText::new(" + let cool_logo = RichText::new(" ▓██ ██▓ ▄▄▄ ███▄ ▄███▓ ██████ ▒██ ██▒▒████▄ ▓██▒▀█▀ ██▒▒██ ▒ ▒██ ██░▒██ ▀█▄ ▓██ ▓██░░ ▓██▄ @@ -37,13 +34,6 @@ pub fn about_ui(ui: &mut egui::Ui) { } else { Color32::DARK_RED }; - - // Although we need to disable some stuff to make it not look like crap most of the time... - let text_wrapping = TextWrapping { - max_width: f32::MAX, - overflow_character: None, - ..Default::default() - }; ui.add(Label::new(cool_logo.color(color))); diff --git a/src/gui/widgets/node_list.rs b/src/gui/widgets/node_list.rs index 6793aff..0206c34 100644 --- a/src/gui/widgets/node_list.rs +++ b/src/gui/widgets/node_list.rs @@ -163,31 +163,4 @@ pub fn nodelist_ui(ui: &mut egui::Ui) { }); } }); -} - - - -// /// Initialise the raw GUI. -// /// We pass all tiling 'widgets' to their own files. -// pub(crate) async fn run_gui() { -// debug!("Running in GUI Mode!"); -// use eframe::{App, egui}; - -// struct MyApp; - -// impl App for MyApp { -// fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { -// // Table Panel, showing nodes in a list. -// egui::CentralPanel::default().show(ctx, |ui| { - -// }); -// } -// } - -// let native_options = eframe::NativeOptions::default(); -// eframe::run_native( -// "Yet Another Meshtastic Server (GUI)", -// native_options, -// Box::new(|_cc| Ok(Box::new(MyApp))), -// ).unwrap(); -// } \ No newline at end of file +} \ No newline at end of file -- GitLab