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

TeachingTip shows an addional white rectangle popup on Linux #634

Open
Genteure opened this issue Dec 27, 2024 · 2 comments
Open

TeachingTip shows an addional white rectangle popup on Linux #634

Genteure opened this issue Dec 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Genteure
Copy link

Genteure commented Dec 27, 2024

Describe the bug

  1. Add <PropertyGroup><AvaloniaVersion>11.2.0</AvaloniaVersion></PropertyGroup> to FAControlsGallery.Desktop.csproj
  2. dotnet run --project samples/FAControlsGallery.Desktop/FAControlsGallery.Desktop.csproj
  3. Open the page for TeachingTip and click button.

Screenshots
image

Desktop/Platform (please complete the following information):

  • OS: Ubuntu 24.04 (GNOME, Wayland)
  • FluentAvalonia Version: latest (or 2.2.0), commit 3ef356a
  • Avalonia Version: 11.2.0 and up

Additional context

image

300, 200 seems to be coming from Avalonia.X11/X11Window.cs. This bug seems to be caused by commit 1cfa82ca in Avalonia first released in 11.2.0-beta1.


Old incorrect bug description for archival purpose

Describe the bug

  1. Change TargetFramework of FAControlsGallery.Desktop.csproj from net8.0 to net9.0
  2. dotnet run --project samples/FAControlsGallery.Desktop/FAControlsGallery.Desktop.csproj
  3. Open the page for TeachingTip and click button.

Screenshots
image

Desktop/Platform (please complete the following information):

  • OS: Ubuntu 24.04 (GNOME, Wayland)
  • FluentAvalonia Version: latest (or 2.2.0), commit 3ef356a
  • Avalonia Version: tested on 11.1.0 and 11.2.2

Additional context
Only reproduced on dotnet 9. It works as intended on dotnet 8.

image

  • On dotnet 8: _lightDismissIndicatorPopup.Child.Bounds = {0, 0, 0, 0}
  • On dotnet 9: _lightDismissIndicatorPopup.Child.Bounds = {0, 0, 300, 200}
  • On both: Width and Height are always NaN, DesiredSize is always {0, 0}

300, 200 seems to be coming from Avalonia.X11/X11Window.cs but I'm not sure. Also I still have no idea why it behaves differently on dotnet 8 and 9.

@Genteure
Copy link
Author

Genteure commented Dec 28, 2024

I tested this in a new Avalonia 11.1.0 project without FluentAvalonia and the Bounds of the popup is the intended 0,0,0,0.

Edit: Everything below is wrong. Still investigating.

It's definitely related to PlacementTarget and AppWindow. When I change the PlacementTarget to this (TeachingTip) or null, it works correctly without explicitly setting the Panel size to 0x0.

PlacementTarget = (Control)VisualRoot

Converting #635 to draft for now. I suspect the real root cause is in AppWindow and I prefer to fix that instead. Otherwise I feel like this kind of bug will appear again elsewhere and stab you in the back when you least expect it 😂

@Genteure Genteure changed the title TeachingTip shows an addional white rectangle popup on Linux with dotnet 9 TeachingTip shows an addional white rectangle popup on Linux Dec 29, 2024
@Genteure
Copy link
Author

Turns out it has nothing to do with .NET versions, not sure how did I think it's related to dotnet versions. I have updated the issue description. #635 should be a reasonable fix.

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

No branches or pull requests

1 participant