#Can Tauri's monitor and window API handle Windows' Scale setting?

3 messages · Page 1 of 1 (latest)

zenith narwhal
#

I have an issue where I'm calculating the position of where I want to spawn a new window. Code works fine for 100% scale and for all resolutions and monitor setups, however, the issue arises when the user has a changed scale setting (for example 4k monitor with scale set to 225%), the window gets lost somewhere and I'm not sure if I can handle the calculation of that?

plush delta
#

That's why there are physical and logical sizes/positions in tauri's api. physical means the actual hardware pixels, and logical has the scale factor applied

#

make sure you use the correct one (idk which one, try both :D ) and more importantly, make sure it's consistent. don't pipe physical pixels into a logical function or something like that