Skip to content

Commit c9766f8

Browse files
authored
Resizable panels + right and bottom panels (#438)
* Side panel resizing and add right panels * Add resizable top/bottom panels * Deprecate TopPanel * Final tweaks and update CHANGELOG.md
1 parent 196ddff commit c9766f8

File tree

16 files changed

+538
-131
lines changed

16 files changed

+538
-131
lines changed

CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,20 @@ NOTE: [`eframe`](eframe/CHANGELOG.md), [`egui_web`](egui_web/CHANGELOG.md) and [
88
## Unreleased
99

1010
### Added ⭐
11+
* Add right and bottom panels (`SidePanel::right` and `Panel::bottom`).
12+
* Add resizable panels.
13+
* Add an option to overwrite frame of a `Panel`.
1114
* Add `Style::override_text_style` to easily change the text style of everything in a `Ui` (or globally).
1215
* You can now change `TextStyle` on checkboxes, radio buttons and `SelectableLabel`.
1316
* Add support for [cint](https://crates.io/crates/cint) under `cint` feature.
1417
* Add features `extra_asserts` and `extra_debug_asserts` to enable additional checks.
15-
* Add an option to overwrite frame of `SidePanel` and `TopPanel`.
1618
* `TextEdit` now supports edits on a generic buffer using `TextBuffer`.
1719

20+
### Changed 🔧
21+
* `TopPanel::top` is now `TopBottomPanel::top`.
22+
* `SidePanel::left` no longet takes the default width by argument, but by a builder call.
23+
24+
1825
## 0.12.0 - 2021-05-10 - Multitouch, user memory, window pivots, and improved plots
1926

2027
### Added ⭐

egui/src/containers/area.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ impl Prepared {
282282
// (except in rare cases where they don't fit).
283283
// Adjust clip rect so we don't cast shadows on side panels:
284284
let central_area = ctx.available_rect();
285-
let is_within_central_area = central_area.contains(self.state.pos);
285+
let is_within_central_area = central_area.contains_rect(self.state.rect().shrink(1.0));
286286
if is_within_central_area {
287287
clip_rect = clip_rect.intersect(central_area);
288288
}

egui/src/containers/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ pub use {
1717
collapsing_header::*,
1818
combo_box::*,
1919
frame::Frame,
20-
panel::{CentralPanel, SidePanel, TopPanel},
20+
panel::{CentralPanel, SidePanel, TopBottomPanel},
2121
popup::*,
2222
resize::Resize,
2323
scroll_area::ScrollArea,
2424
window::Window,
2525
};
26+
27+
#[allow(deprecated)]
28+
pub use panel::TopPanel;

0 commit comments

Comments
 (0)