Improve title bar

This commit is contained in:
Michael Mikovsky
2025-11-29 16:38:12 -07:00
parent c83e2f1527
commit f85a0c0295
8 changed files with 80 additions and 30 deletions
+15 -2
View File
@@ -19,7 +19,7 @@ pub struct AppState {
impl AppState {
pub fn labels(&mut self, tree: &mut Tree<WindowWrapper>, ui: &mut egui::Ui) {
for (i, (key, name)) in (vec![
for (_, (key, name)) in (vec![
(AppWindow::Flowchart, "Flowchart"),
(AppWindow::Config, "Config"),
])
@@ -38,7 +38,7 @@ impl AppState {
// if self.open_windows.is_empty()
} else {
let tid = tree.tiles.insert_pane(WindowWrapper {
nr: i + 1,
name: name.to_string(),
window: *key,
});
@@ -78,4 +78,17 @@ impl AppWindow {
AppWindow::Config => state.config.update(&mut state.auth, ui),
}
}
fn render_title_buttons(&self, state: &mut AppState, ui: &mut egui::Ui) {
match self {
AppWindow::Flowchart => {
if ui.button("Arrange").clicked() {
state.flowchart.arrange();
}
}
_ => {
ui.label("");
}
}
}
}