1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Rename Panel methods (#8192)

The three methods for showing a `Panel` are now:

* `panel.show`: always show the panel.
* `panel.show_collapsible`: show or hide the panel, with a slide
animation in between.
* `Panel::show_switched`: animate between two different panels: a
thin/collapsed one and a thick/expanded one.
This commit is contained in:
Emil Ernerfeldt
2026-05-24 12:22:32 +02:00
committed by GitHub
parent 3cf844c542
commit 27559ef3fd
44 changed files with 159 additions and 99 deletions

View File

@@ -33,14 +33,14 @@ impl Default for EasyMarkEditor {
impl EasyMarkEditor {
pub fn panels(&mut self, ui: &mut egui::Ui) {
egui::Panel::bottom("easy_mark_bottom").show_inside(ui, |ui| {
egui::Panel::bottom("easy_mark_bottom").show(ui, |ui| {
let layout = egui::Layout::top_down(egui::Align::Center).with_main_justify(true);
ui.allocate_ui_with_layout(ui.available_size(), layout, |ui| {
ui.add(crate::egui_github_link_file!())
})
});
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
self.ui(ui);
});
}