1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

eframe: Improve window centering (#2651)

* Create the winit::Window in one unified place

* Fix wrong unit of initial_window_pos

* Improve centering
This commit is contained in:
Emil Ernerfeldt
2023-01-30 15:52:30 +01:00
committed by GitHub
parent f222ee044e
commit cc20dcb9d0
3 changed files with 34 additions and 54 deletions

View File

@@ -42,6 +42,10 @@ impl WindowSettings {
}
}
pub fn inner_size_points(&self) -> Option<egui::Vec2> {
self.inner_size_points
}
pub fn initialize_window(
&self,
mut window: winit::window::WindowBuilder,