godot icon indicating copy to clipboard operation
godot copied to clipboard

UI: `Window/wrap_controls` does not account for the `content_scale_factor`

Open Delsin-Yu opened this issue 9 months ago • 0 comments

Tested versions

Godot v4.3.dev6 - Windows 10.0.19044 - Vulkan (Forward+) - integrated AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.; 30.0.13002.1001) - AMD Ryzen 9 5900HS with Radeon Graphics (16 Threads)

System information

Godot v4.3.dev6 - Windows 10.0.19044 - Vulkan (Forward+) - integrated AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.; 30.0.13002.1001) - AMD Ryzen 9 5900HS with Radeon Graphics (16 Threads)

Issue description

wrap_controls allows a window to self-determine its best minimum size for displaying its children Controls, however, such calculation forgot to include the content_scale_factor, which leads the window too big (if the scale factor is less than one) or too small (if the scale factor is larger than one) for its content_scale_factor applied children.

https://github.com/godotengine/godot/assets/71481700/107aac42-9d17-469e-a605-bbea91124e08

Steps to reproduce

  1. Download the MRP
  2. Open the MRP with the correct version
  3. Run the project
  4. Do what the video did
  5. Inspect the issue

Minimal reproduction project (MRP)

MRP_WrapControls_DoesNotRespect_ContentScaleFactor.zip

Delsin-Yu avatar May 14 '24 21:05 Delsin-Yu