FluentAvalonia icon indicating copy to clipboard operation
FluentAvalonia copied to clipboard

Shadows are missing in FluentAvalonia 2.1.0

Open IsaacMarovitz opened this issue 1 year ago • 4 comments

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

IsaacMarovitz avatar Aug 04 '24 19:08 IsaacMarovitz

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.

robloo avatar Aug 18 '24 15:08 robloo

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.

xLEGiON avatar Oct 10 '24 14:10 xLEGiON

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.

  • https://github.com/AvaloniaUI/Avalonia/issues/16387
  • https://github.com/AvaloniaUI/Avalonia/issues/15602

robloo avatar Oct 11 '24 01:10 robloo

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.

amwx avatar Oct 12 '24 15:10 amwx