From 3e066c3e3cdaad74b7cf98403dd5f1f1272fe5bf Mon Sep 17 00:00:00 2001 From: Vlad2001MFS Date: Mon, 7 Oct 2024 14:57:45 +0300 Subject: [PATCH] fix an invalid editor window size on second startup at the hidpi display Probably was broken in the 811a13426ddb808e778c6ac436671eef87aab9af commit for the #453 issue, but issue still not fixed. The window_size field is used as the PhysicalSize in all other cases. --- editor/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/src/lib.rs b/editor/src/lib.rs index d1843b966..82d7e0ecf 100644 --- a/editor/src/lib.rs +++ b/editor/src/lib.rs @@ -90,7 +90,7 @@ use crate::{ watcher::FileSystemWatcher, TypeUuidProvider, }, - dpi::{LogicalSize, PhysicalPosition}, + dpi::{PhysicalPosition, PhysicalSize}, engine::{Engine, EngineInitParams, GraphicsContextParams, SerializationContext}, event::{Event, WindowEvent}, event_loop::{EventLoop, EventLoopWindowTarget}, @@ -561,7 +561,7 @@ impl Editor { )), } - let inner_size = LogicalSize::new( + let inner_size = PhysicalSize::new( settings.windows.window_size.x, settings.windows.window_size.y, );