start to clean up vibecode
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user