mirror of
https://github.com/emilk/egui.git
synced 2026-09-03 15:20:05 -04:00
Convert all SidePanel with Panel
following those steps:
1. Rename `egui::SidePanel` with `egui::Panel`.
2. Rename `width` with `size` in all chained methods.
- `default_width()` to `default_size()`
- `min_width()` to `min_size()`
- `max_width()` to `max_size()`
- `width_range()` to `size_range()`
- `exact_width()` to `exact_size()`
if using `Panel::new()`, replace
- `Side::Left` with `Side::Vertical(VerticalSide::Left)`
- `Side::Right` with `Side::Vertical(VerticalSide::Right)`
NOTE: Non-working commit
This commit is contained in:
@@ -252,10 +252,10 @@ impl DemoWindows {
|
||||
}
|
||||
|
||||
fn desktop_ui(&mut self, ctx: &Context) {
|
||||
egui::SidePanel::right("egui_demo_panel")
|
||||
egui::Panel::right("egui_demo_panel")
|
||||
.resizable(false)
|
||||
.default_width(160.0)
|
||||
.min_width(160.0)
|
||||
.default_size(160.0)
|
||||
.min_size(160.0)
|
||||
.show(ctx, |ui| {
|
||||
ui.add_space(4.0);
|
||||
ui.vertical_centered(|ui| {
|
||||
|
||||
@@ -34,10 +34,10 @@ impl crate::View for Panels {
|
||||
});
|
||||
});
|
||||
|
||||
egui::SidePanel::left("left_panel")
|
||||
egui::Panel::left("left_panel")
|
||||
.resizable(true)
|
||||
.default_width(150.0)
|
||||
.width_range(80.0..=200.0)
|
||||
.default_size(150.0)
|
||||
.size_range(80.0..=200.0)
|
||||
.show_inside(ui, |ui| {
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.heading("Left Panel");
|
||||
@@ -47,10 +47,10 @@ impl crate::View for Panels {
|
||||
});
|
||||
});
|
||||
|
||||
egui::SidePanel::right("right_panel")
|
||||
egui::Panel::right("right_panel")
|
||||
.resizable(true)
|
||||
.default_width(150.0)
|
||||
.width_range(80.0..=200.0)
|
||||
.default_size(150.0)
|
||||
.size_range(80.0..=200.0)
|
||||
.show_inside(ui, |ui| {
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.heading("Right Panel");
|
||||
|
||||
@@ -35,7 +35,7 @@ impl crate::View for Tooltips {
|
||||
ui.add(crate::egui_github_link_file_line!());
|
||||
});
|
||||
|
||||
egui::SidePanel::right("scroll_test").show_inside(ui, |ui| {
|
||||
egui::Panel::right("scroll_test").show_inside(ui, |ui| {
|
||||
ui.label(
|
||||
"The scroll area below has many labels with interactive tooltips. \
|
||||
The purpose is to test that the tooltips close when you scroll.",
|
||||
|
||||
Reference in New Issue
Block a user