From 9dad7f827d90628070379ac2735e60e05e6188d1 Mon Sep 17 00:00:00 2001 From: Piotr Podusowski Date: Tue, 18 Feb 2025 18:03:42 +0100 Subject: [PATCH] Align `available_rect` docs with the new reality after #4590 (#5701) ...as after #4590, `Window`/`Area` is not constrained within it. --- crates/egui/src/context.rs | 5 +---- crates/egui/src/pass_state.rs | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index ea36040c..aa4b5340 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -2549,10 +2549,7 @@ impl Context { self.input(|i| i.screen_rect()).round_ui() } - /// How much space is still available after panels has been added. - /// - /// This is the "background" area, what egui doesn't cover with panels (but may cover with windows). - /// This is also the area to which windows are constrained. + /// How much space is still available after panels have been added. pub fn available_rect(&self) -> Rect { self.pass_state(|s| s.available_rect()).round_ui() } diff --git a/crates/egui/src/pass_state.rs b/crates/egui/src/pass_state.rs index 942001c7..49d6c758 100644 --- a/crates/egui/src/pass_state.rs +++ b/crates/egui/src/pass_state.rs @@ -202,7 +202,6 @@ pub struct PassState { /// Starts off as the `screen_rect`, shrinks as panels are added. /// The [`crate::CentralPanel`] does not change this. - /// This is the area available to Window's. pub available_rect: Rect, /// Starts off as the `screen_rect`, shrinks as panels are added. @@ -303,8 +302,6 @@ impl PassState { } /// How much space is still available after panels has been added. - /// This is the "background" area, what egui doesn't cover with panels (but may cover with windows). - /// This is also the area to which windows are constrained. pub(crate) fn available_rect(&self) -> Rect { debug_assert!( self.available_rect.is_finite(),