Add ScrollArea to notes container

This commit is contained in:
Sofía Aritz 2023-02-27 17:16:04 +01:00
parent b599f628de
commit e839770c9a

View file

@ -122,6 +122,7 @@ impl eframe::App for App {
});
ui.separator();
egui::ScrollArea::vertical().show(ui, |ui| {
for note in &mut self.notes {
let render_result = note.render(ui, password, |id| {
let _ = &self.saving.delete_note(&id).unwrap();
@ -136,6 +137,7 @@ impl eframe::App for App {
ui.add_space(10.0);
}
});
});
}
CurrentMode::Compose => {
let password = self.password.as_ref().unwrap();
@ -153,6 +155,7 @@ impl eframe::App for App {
});
ui.separator();
egui::ScrollArea::vertical().show(ui, |ui| {
ui.label("title:");
ui.text_edit_singleline(&mut self.title_buffer);
@ -187,6 +190,7 @@ impl eframe::App for App {
self.mode = CurrentMode::View;
}
});
});
}
CurrentMode::PasswordInput => {
egui::CentralPanel::default().show(ctx, |ui| {