Skip to content

Commit

Permalink
fix-inconsistent-naming (#3438)
Browse files Browse the repository at this point in the history
  • Loading branch information
rinde committed Nov 10, 2023
1 parent 4c74e92 commit c0b14f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/egui/src/containers/area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl Area {
self
}

/// Constraint the movement of the window to the given rectangle.
/// Constrain the movement of the window to the given rectangle.
///
/// For instance: `.constrain_to(ctx.screen_rect())`.
pub fn constrain_to(mut self, constrain_rect: Rect) -> Self {
Expand Down
6 changes: 3 additions & 3 deletions crates/egui/src/containers/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,18 @@ impl<'open> Window<'open> {

/// Constrains this window to the screen bounds.
///
/// To change the area to constrain to, use [`Self::constraint_to`].
/// To change the area to constrain to, use [`Self::constrain_to`].
///
/// Default: `true`.
pub fn constrain(mut self, constrain: bool) -> Self {
self.area = self.area.constrain(constrain);
self
}

/// Constraint the movement of the window to the given rectangle.
/// Constrain the movement of the window to the given rectangle.
///
/// For instance: `.constrain_to(ctx.screen_rect())`.
pub fn constraint_to(mut self, constrain_rect: Rect) -> Self {
pub fn constrain_to(mut self, constrain_rect: Rect) -> Self {
self.area = self.area.constrain_to(constrain_rect);
self
}
Expand Down

0 comments on commit c0b14f4

Please sign in to comment.