Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since Avalonia 11.2.0, SplitToWindow doesn't open with the correct width and height #378

Open
ethanavatar opened this issue Dec 14, 2024 · 2 comments · May be fixed by #379
Open

Since Avalonia 11.2.0, SplitToWindow doesn't open with the correct width and height #378

ethanavatar opened this issue Dec 14, 2024 · 2 comments · May be fixed by #379
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ethanavatar
Copy link

ethanavatar commented Dec 14, 2024

I just updated to Avalonia 11.2.2 along with Dock 11.2.0, and now the SplitToWindow function is opening windows that are way bigger than the numbers I set in width and height. The numbers don't seem to be doing anything. I can put in a big or small number, and the resulting window is always the same size.

Tested versions:

  • Dock 11.2.0 and Avalonia 11.2.2 it is Broken
  • Dock 11.2.0 and Avalonia 11.2.0 it is Broken
  • Dock 11.1.0.4 and Avalonia 11.2.2 it is Broken
  • Dock 11.1.0.4 and Avalonia 11.2.0 it is Broken
  • Dock 11.1.0.4 and Avalonia 11.1.5 it is Working

Edit:

This behavior can also be seen when dragging a dockable out of a ToolDock into a floating window

@wieslawsoltes
Copy link
Owner

Seems like a bug

@wieslawsoltes wieslawsoltes added bug Something isn't working help wanted Extra attention is needed labels Dec 14, 2024
ethanavatar added a commit to ethanavatar/Dock that referenced this issue Dec 16, 2024
@ethanavatar
Copy link
Author

For some reason, setting the window size after the window has already been presented is broken in Avalonia 11.2.x. This is probably a bug in Avalonia, because setting the position after presenting is still working as expected.

I have made a PR that moves the call to Present after SetSize, and now the floating windows are opening with the right size in both my program and Dock.Mvvm.Sample. Please take a look when you get the chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants