amwx / FluentAvalonia

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

SelectableTextBlock Issues #550

Closed xLEGiON closed 7 months ago

xLEGiON commented 7 months ago

Describe the bug

There are a few issues when using the SelectableTextBlock with the FluentAvaloniaTheme:

  1. The ControlTheme does not set the SelectionBrush, so the selection is not visible. The Avalonia themes added this here: https://github.com/AvaloniaUI/Avalonia/commit/9a3ed2e0228c5d12c773de632805bbf6f944df50. The change just needs to be copied across to the FluentAvaloniaTheme.

  2. The "Copy" button on the ContextFlyout is always visible. The Avalonia themes disable this button when there is no text selected. The expected behavior is that this button would be hidden on the FluentAvaloniaTheme when no text is selected.

  3. Clicking the "Copy" button on the ContextFlyout copies the entire text instead of only the selected text. The expected behavior is that this only copies the selected text.

Desktop/Platform:

Additional context

I have tested fixes for these issues and will submit a pull request for consideration.

amwx commented 7 months ago

Closed by #551