Closed Horbin-Magician closed 8 months ago
I couldn't reproduce the problem on X11.
I couldn't reproduce the problem on X11.
But this phenomenon does occur on two of my windows devices (one win10, the other win11). Can I get details somewhere about how to read and contribute to the source code? Maybe I can try to fix this myself.
I haven't tried with Windows yet. In slint, the code that sets the window constraints is supposed to be there: https://github.com/slint-ui/slint/blob/84202f6af3ae56f0ae51fd61268d360487f9980d/internal/backends/winit/winitwindowadapter.rs#L553
What i'd do to debug is check (by adding eprintln) if this is called with the expected value of the size. If it is called, then it might be a problem in winit.
I haven't tried with Windows yet. In slint, the code that sets the window constraints is supposed to be there:
What i'd do to debug is check (by adding eprintln) if this is called with the expected value of the size. If it is called, then it might be a problem in winit.
https://github.com/slint-ui/slint/assets/46142827/b9e40a07-f828-468d-ac29-34da8c591beb
So, this is a problem in winit?
Yes, this seems to be a bug in winit
I assume this was fixed by #4032
(Win11, Rust, winit-femtovg) This is my simple demo:
I hope that when the button is clicked, the size of the button and the window change together. It works well in Slint1.2.2, but doesn't work in Slint1.3.0.
I think the feature of the window changing with the size of its content is very important, so this might be a Bug in the new version (1.3.0).