1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

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
This commit is contained in:
Emil Ernerfeldt
2021-05-26 22:06:10 +02:00
committed by GitHub
parent 196ddff499
commit c9766f8a7b
16 changed files with 538 additions and 131 deletions

View File

@@ -202,6 +202,11 @@ impl Rect {
self.min.x <= p.x && p.x <= self.max.x && self.min.y <= p.y && p.y <= self.max.y
}
#[must_use]
pub fn contains_rect(&self, other: Rect) -> bool {
self.contains(other.min) && self.contains(other.max)
}
/// Return the given points clamped to be inside the rectangle
/// Panics if [`Self::is_negative`].
#[must_use]