amwx / FluentAvalonia

Control library focused on fluent design and bringing more WinUI controls into Avalonia
MIT License
1.01k stars 98 forks source link

Shadows are missing in FluentAvalonia 2.1.0 #601

Open IsaacMarovitz opened 2 months ago

IsaacMarovitz commented 2 months ago

This issue is visible on ContentDialogs

FluentAvalonia 2.0.5:

image

FluentAvalonia 2.1.0:

image

Probably related to https://github.com/AvaloniaUI/Avalonia/issues/15602

robloo commented 2 months ago

Do you see the Window shadow on the desktop? What about for actual Popup/Flyout rather than overlay?

This issue is on my radar as well. I don't have shadows of any kind though. If we can narrow it down I'll definitely help fix it.

xLEGiON commented 2 weeks ago

PR https://github.com/amwx/FluentAvalonia/pull/541 commit "Remove uses of FABorder" added the "BackgroundSizing" attribute to the "BackgroundElement" Border in "ContentDialogStyles.axaml". Setting this to the default value of "CenterBorder" in Avalonia DevTools made the shadows re-appear for me. Maybe the attribute can just be removed.

robloo commented 2 weeks ago

Ah, thanks for confirming that's what this is. I'll try to prioritize fixing it upstream. It shouldn't be an issue as long as it isn't a performance issue.

amwx commented 2 weeks ago

So my plan here was to switch from BoxShadow over to the newer Effect shadow which works with any background sizing, though it might be slightly less performant than the basic BoxShadow. If a borderbrush needs to be used, I really want to avoid CenterBorder where possible.