iced-rs/iced

Layout issues when resizing window

njust opened this issue · 5 comments

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

Using the current master branch, a simple layout causes problems when resizing the window:

layout_issue.mp4

Repository with the example:
https://github.com/njust/iced_layout_issue

What is the expected behavior?

The layout should be consistent.

Version

master

Operating System

Windows

Do you have any log output?

No response

I cannot reproduce.

I'm working on a virtual machine (VMWare Workstation 17). I recognized that iced version 0.12.1 has the same layout issues, but only when using the wgpu backend. Switching to the tiny-skia backend solves that on version 0.12.1. Unfortunately, using the tiny-skia backend on the current master branch, doesn't fix the layout issues. From the log I can see that the following adapter was selected:

INFO [iced_wgpu::window::compositor] Selected: AdapterInfo {
    name: "Microsoft Basic Render Driver",
    vendor: 5140,
    device: 140,
    device_type: Cpu,
    driver: "",
    driver_info: "",
    backend: Dx12,
}

I also attached the full log. Hope that helps.
Demo_2024-04-18_09-33-17.log

Sorry for the double post. But it seems, that setting the environment variable ICED_BACKEND=tiny-skia doesn't have an effect on the current master branch. Therefore, I tried to force the usage of tina-skia by removing the wgpu feature via default-features = false which leads to a white screen:
image

njust commented

Short update, I tried today again with the latest master branch and this is still an issue. I updated the example to use the content explain feature. The problem only occurs if the content in the scroll area does not have enough space:

untitled.mp4

I also attached the current log file:
Demo_2024-05-03_17-55-50.log

The repository with the updated example is here:
https://github.com/njust/iced_layout_issue

Is there any way I can help to analyze the problem?

hecrj commented

This is most certainly a graphics driver issue.

If you are using a VM, enable the tiny-skia feature and use it with ICED_BACKEND=tiny-skia.