mirror of
https://github.com/emilk/egui.git
synced 2026-09-03 23:30:04 -04:00
Convert all TopBottomPanel with Panel, and remove reference to TopBottomPanel when both SidePanel and TopBottomPanel were mentioned.
following those steps:
1. Rename `egui::TopBottomPanel` with `egui::Panel`.
2. Rename `height` with `size` in all chained methods.
- `default_height()` to `default_size()`
- `min_height()` to `min_size()`
- `max_height()` to `max_size()`
- `height_range()` to `size_range()`
- `exact_height()` to `exact_size()`
if using `Panel::new()`, replace
- `TopBottomSide::Top` with `Side::Horizontal(HorizontalSide::Top)`
- `TopBottomSide::Bottom` with `Side::Horizontal(HorizontalSide::Bottom)`
NOTE: Non-working commit
This commit is contained in:
@@ -224,7 +224,7 @@ impl DemoWindows {
|
||||
}
|
||||
|
||||
fn mobile_top_bar(&mut self, ctx: &Context) {
|
||||
egui::TopBottomPanel::top("menu_bar").show(ctx, |ui| {
|
||||
egui::Panel::top("menu_bar").show(ctx, |ui| {
|
||||
egui::menu::bar(ui, |ui| {
|
||||
let font_size = 16.5;
|
||||
|
||||
@@ -279,7 +279,7 @@ impl DemoWindows {
|
||||
self.demo_list_ui(ui);
|
||||
});
|
||||
|
||||
egui::TopBottomPanel::top("menu_bar").show(ctx, |ui| {
|
||||
egui::Panel::top("menu_bar").show(ctx, |ui| {
|
||||
egui::menu::bar(ui, |ui| {
|
||||
file_menu_button(ui);
|
||||
});
|
||||
|
||||
@@ -22,9 +22,9 @@ impl crate::View for Panels {
|
||||
fn ui(&mut self, ui: &mut egui::Ui) {
|
||||
// Note that the order we add the panels is very important!
|
||||
|
||||
egui::TopBottomPanel::top("top_panel")
|
||||
egui::Panel::top("top_panel")
|
||||
.resizable(true)
|
||||
.min_height(32.0)
|
||||
.min_size(32.0)
|
||||
.show_inside(ui, |ui| {
|
||||
egui::ScrollArea::vertical().show(ui, |ui| {
|
||||
ui.vertical_centered(|ui| {
|
||||
@@ -60,9 +60,9 @@ impl crate::View for Panels {
|
||||
});
|
||||
});
|
||||
|
||||
egui::TopBottomPanel::bottom("bottom_panel")
|
||||
egui::Panel::bottom("bottom_panel")
|
||||
.resizable(false)
|
||||
.min_height(0.0)
|
||||
.min_size(0.0)
|
||||
.show_inside(ui, |ui| {
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.heading("Bottom Panel");
|
||||
|
||||
@@ -33,7 +33,7 @@ impl Default for EasyMarkEditor {
|
||||
|
||||
impl EasyMarkEditor {
|
||||
pub fn panels(&mut self, ctx: &egui::Context) {
|
||||
egui::TopBottomPanel::bottom("easy_mark_bottom").show(ctx, |ui| {
|
||||
egui::Panel::bottom("easy_mark_bottom").show(ctx, |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!())
|
||||
|
||||
Reference in New Issue
Block a user