1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -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

@@ -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);