Skip to content

Commit

Permalink
Update window.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Oct 28, 2024
1 parent 5b846b4 commit 87b5dcd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/egui/src/containers/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,21 +287,25 @@ impl<'open> Window<'open> {
/// Set initial size of the window.
#[inline]
pub fn default_size(mut self, default_size: impl Into<Vec2>) -> Self {
let default_size: Vec2 = default_size.into();
self.resize = self.resize.default_size(default_size);
self.area = self.area.default_size(default_size);
self
}

/// Set initial width of the window.
#[inline]
pub fn default_width(mut self, default_width: f32) -> Self {
self.resize = self.resize.default_width(default_width);
self.area = self.area.default_width(default_width);
self
}

/// Set initial height of the window.
#[inline]
pub fn default_height(mut self, default_height: f32) -> Self {
self.resize = self.resize.default_height(default_height);
self.area = self.area.default_height(default_height);
self
}

Expand Down

0 comments on commit 87b5dcd

Please sign in to comment.