1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Fix pixels per point for multiples viewports

Fix ./scripts/check.sh errors
This commit is contained in:
Konkitoman
2023-10-22 17:15:21 +03:00
parent b4224566ed
commit d6c2f3e8f3
12 changed files with 93 additions and 82 deletions

View File

@@ -49,10 +49,10 @@ puffin = ["dep:puffin", "egui/puffin"]
serde = ["egui/serde", "dep:serde"]
## Enables Wayland support.
wayland = ["winit/wayland"]
wayland = ["winit/wayland", "bytemuck"]
## Enables compiling for x11.
x11 = ["winit/x11"]
x11 = ["winit/x11", "bytemuck"]
[dependencies]
egui = { version = "0.23.0", path = "../egui", default-features = false, features = [

View File

@@ -706,6 +706,7 @@ impl State {
pub fn handle_platform_output(
&mut self,
window: &winit::window::Window,
viewport_id: ViewportId,
egui_ctx: &egui::Context,
platform_output: egui::PlatformOutput,
) {
@@ -719,7 +720,7 @@ impl State {
#[cfg(feature = "accesskit")]
accesskit_update,
} = platform_output;
self.current_pixels_per_point = egui_ctx.pixels_per_point(); // someone can have changed it to scale the UI
self.current_pixels_per_point = egui_ctx.input_for(viewport_id, |i| i.pixels_per_point); // someone can have changed it to scale the UI
self.set_cursor_icon(window, cursor_icon);