From 0efafb66ef078e13dfeaa39f65edd534b03684a7 Mon Sep 17 00:00:00 2001 From: One <43485962+c-git@users.noreply.github.com> Date: Sat, 1 Jun 2024 21:37:39 -0400 Subject: [PATCH] feat: add way for user to know copy is possible --- src/app.rs | 20 +++++++++++++++----- src/lib.rs | 1 - 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/app.rs b/src/app.rs index 8107456..3ca96bf 100644 --- a/src/app.rs +++ b/src/app.rs @@ -304,12 +304,20 @@ impl LogViewerApp { fn ui_options(&mut self, ui: &mut egui::Ui) { ui.collapsing("Options", |ui| { + ui.add( + egui::DragValue::new(&mut self.main_table_screen_proportion) + .speed(0.01) + .clamp_range(0.2..=0.85) + .prefix("Main Area Proportion Percentage "), + ); + }); + } + + fn ui_help(&mut self, ui: &mut egui::Ui) { + ui.collapsing("Help", |ui| { ui.horizontal(|ui| { - ui.add( - egui::DragValue::new(&mut self.main_table_screen_proportion) - .speed(0.01) - .clamp_range(0.2..=0.85) - .prefix("Main Area Proportion Percentage "), + ui.label( + "Text is selectable just hover over it for a short time if you want to copy", ); }); }); @@ -369,6 +377,8 @@ impl eframe::App for LogViewerApp { ui.separator(); self.ui_options(ui); ui.separator(); + self.ui_help(ui); + ui.separator(); egui::ScrollArea::vertical() .id_source("scroll for overflow") diff --git a/src/lib.rs b/src/lib.rs index d998dee..0b2ce12 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,6 @@ pub use app::LogViewerApp; // TODO 1: Add a reload log button // TODO 1: Add a open most recent log button // TODO 2: Add search -// TODO 2: Figure out how to let the user know that the text is selectable. It's not obvious at first glance (requires you to wait with the mouse in one place then you can select) // TODO 3: Add button to show/hide either the top or bottom // TODO 3: Add checkbox to filter by current request id // TODO 3: Add filter by and let user pick like ID or date or something like that