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 windows not being centered properly when system interface is scaled #8903

Merged
merged 3 commits into from
Jun 21, 2023
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: 3 additions & 1 deletion crates/bevy_winit/src/winit_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ pub fn winit_window_position(
if let Some(monitor) = maybe_monitor {
let screen_size = monitor.size();

let scale_factor = resolution.base_scale_factor();
// We use the monitors scale factor here since WindowResolution.scale_factor
// is not yet populated when windows are created at plugin setup
let scale_factor = monitor.scale_factor();

// Logical to physical window size
let (width, height): (u32, u32) =
Expand Down
Loading