start to clean up vibecode

This commit is contained in:
2025-12-11 19:32:38 +01:00
parent 60c2c288c5
commit 3d3ca9a81b
6 changed files with 527 additions and 465 deletions

View File

@@ -3,16 +3,23 @@ use eframe::egui;
use crate::highlight::HighlightManager;
use crate::tab_manager::IndexingState;
pub struct TopMenuActions{
pub open_file_requested: bool,
}
pub fn render_top_menu(
ctx: &egui::Context,
highlight_manager: &mut HighlightManager,
indexing_state: &IndexingState,
on_open_file: &mut bool,
) {
) -> TopMenuActions {
let mut top_menu_actions = TopMenuActions{open_file_requested: false};
egui::TopBottomPanel::top("top_panel").show(ctx, |ui| {
ui.horizontal(|ui| {
if ui.button("📂 Open File").clicked() {
*on_open_file = true;
top_menu_actions.open_file_requested = true;
}
if ui.button("🎨 Highlights").clicked() {
@@ -46,4 +53,6 @@ pub fn render_top_menu(
}
});
});
top_menu_actions
}