Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Window::default_pos does not work #5315

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading