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

Improve multi-viewports across monitors with different scales (#3663)

It required some ugly code in `egui-winit` in order to fix this without
breaking sem-ver (I want this to land in a 0.24.1 patch release). I'll
clean up in time for 0.25.

There is still a font rendering bug when using immediate viewports
across multiple viewports, but that's harder to fix.
This commit is contained in:
Emil Ernerfeldt
2023-11-30 12:08:53 +01:00
committed by GitHub
parent 37244e3632
commit 61a7b90d5b
8 changed files with 213 additions and 116 deletions

View File

@@ -40,7 +40,6 @@ impl EguiGlow {
native_pixels_per_point,
Some(painter.max_texture_side()),
);
let pixels_per_point = egui_winit.pixels_per_point();
Self {
egui_ctx: Default::default(),
@@ -48,7 +47,7 @@ impl EguiGlow {
painter,
viewport_info: Default::default(),
shapes: Default::default(),
pixels_per_point,
pixels_per_point: native_pixels_per_point.unwrap_or(1.0),
textures_delta: Default::default(),
}
}