1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 23:00: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:
Bruno Paré-Simard
2025-01-30 14:15:53 -05:00
parent ae42de6c9c
commit 3bff23f39b
17 changed files with 23 additions and 1487 deletions

View File

@@ -61,7 +61,7 @@ impl Default for HttpApp {
impl eframe::App for HttpApp {
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
egui::TopBottomPanel::bottom("http_bottom").show(ctx, |ui| {
egui::Panel::bottom("http_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(egui_demo_lib::egui_github_link_file!())

View File

@@ -53,7 +53,7 @@ impl Default for ImageViewer {
impl eframe::App for ImageViewer {
fn update(&mut self, ctx: &egui::Context, _: &mut eframe::Frame) {
egui::TopBottomPanel::new(Side::Horizontal(HorizontalSide::Top), "url bar").show(
egui::Panel::new(Side::Horizontal(HorizontalSide::Top), "url bar").show(
ctx,
|ui| {
ui.horizontal_centered(|ui| {

View File

@@ -296,7 +296,7 @@ impl eframe::App for WrapApp {
}
let mut cmd = Command::Nothing;
egui::TopBottomPanel::top("wrap_app_top_bar")
egui::Panel::top("wrap_app_top_bar")
.frame(egui::Frame::new().inner_margin(4))
.show(ctx, |ui| {
ui.horizontal_wrapped(|ui| {