remove adornments
DELETE
WalletWasabi.Fluent/Behaviors/UnusedAddressItemDetailsBehavior.cs
-using System.Linq;
-using System.Reactive.Disposables;
-using System.Reactive.Linq;
-using Avalonia;
-using Avalonia.Controls;
-using Avalonia.Input;
-using Avalonia.Threading;
-using Avalonia.VisualTree;
-using DataBox;
-using WalletWasabi.Fluent.Controls;
-
-namespace WalletWasabi.Fluent.Behaviors;
-
-public class UnusedAddressItemDetailsBehavior : DisposingBehavior<DataBoxRow>
-{
- private DataBoxItemDetailsAdorner? _itemDetailsAdorner;
- private IDisposable? _currentAdornerEvents;
-
- protected override void OnAttached(CompositeDisposable disposables)
- {
- if (AssociatedObject is not null)
- {
- Observable.FromEventPattern(AssociatedObject, nameof(AssociatedObject.DetachedFromVisualTree))
- .Subscribe(x =>
- {
- Remove();
- })
- .DisposeWith(disposables);
-
- AssociatedObject
- .GetObservable(InputElement.IsPointerOverProperty)
- .Subscribe(x =>
- {
- if (AssociatedObject.IsPointerOver)
- {
- AddAdorner(AssociatedObject);
- }
- else
- {
- CheckIfShouldRemove();
- }
- })
- .DisposeWith(disposables);
- }
- }
-
- private void CheckIfShouldRemove()
- {
- Dispatcher.UIThread.Post(() =>
- {
- if (AssociatedObject is not null && _itemDetailsAdorner != null && !AssociatedObject.IsPointerOver && !_itemDetailsAdorner.IsPointerOver)
- {
- RemoveAdorner(AssociatedObject);
- }
- });
- }
-
- private void Remove()
- {
- if (AssociatedObject is not null)
- {
- RemoveAdorner(AssociatedObject);
- }
-
- _currentAdornerEvents?.Dispose();
- _currentAdornerEvents = null;
- }
-
- protected override void OnDetaching()
- {
- Remove();
-
- base.OnDetaching();
- }
-
- private void AddAdorner(DataBoxRow dataBoxRow)
- {
- _currentAdornerEvents?.Dispose();
- _currentAdornerEvents = null;
-
- var layer = dataBoxRow.GetVisualRoot().GetVisualDescendants().OfType<AdornerCanvas>()
- .FirstOrDefault(x => x.Name == "DialogAdornerCanvas");
-
- if (layer is null || _itemDetailsAdorner is not null)
- {
- return;
- }
-
- _itemDetailsAdorner = new DataBoxItemDetailsAdorner
- {
- [AdornerCanvas.AdornedElementProperty] = dataBoxRow,
- [AdornerCanvas.IsClipEnabledProperty] = false,
- Row = dataBoxRow
- };
-
- _currentAdornerEvents = _itemDetailsAdorner.GetObservable(InputElement.IsPointerOverProperty)
- .Subscribe(_ => CheckIfShouldRemove());
-
- ((ISetLogicalParent)_itemDetailsAdorner).SetParent(dataBoxRow);
- layer.Children.Add(_itemDetailsAdorner);
- }
-
- private void RemoveAdorner(DataBoxRow dataBoxRow)
- {
- _currentAdornerEvents?.Dispose();
- _currentAdornerEvents = null;
-
- var layer = AdornerCanvas.GetAdornerLayer(dataBoxRow);
- if (layer is null || _itemDetailsAdorner is null)
- {
- return;
- }
-
- layer.Children.Remove(_itemDetailsAdorner);
- ((ISetLogicalParent)_itemDetailsAdorner).SetParent(null);
- _itemDetailsAdorner = null;
- }
-}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/MainView.axaml
WalletWasabi.Fluent/Views/MainView.axaml
</c:Dialog.Styles>
<ContentControl Content="{Binding CurrentPage}" />
</c:Dialog>
- <c:AdornerCanvas Name="DialogAdornerCanvas" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<c:Dialog x:CompileBindings="False"
DataContext="{Binding DialogScreen}"
IsDialogOpen="{Binding IsDialogOpen, Mode=TwoWay}"

MODIFY
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveAddressesView.axaml
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveAddressesView.axaml
<DataBox Items="{Binding Addresses}"
CanUserSortColumns="True">
<DataBox.Styles>
-
- <Style Selector="DataBoxRow">
- <Setter Property="(Interaction.Behaviors)">
- <BehaviorCollectionTemplate>
- <BehaviorCollection>
- <behaviors:UnusedAddressItemDetailsBehavior />
- </BehaviorCollection>
- </BehaviorCollectionTemplate>
- </Setter>
- </Style>
<Style Selector="c|AnimatedButton.addressActionButton">
<Setter Property="DockPanel.Dock" Value="Right" />
<Setter Property="Margin" Value="5 0 0 0" />
<Setter Property="Height" Value="15" />
<Setter Property="Foreground" Value="{DynamicResource SystemAccentColor}" />
</Style>
-
- <Style Selector="behaviors|DataBoxItemDetailsAdorner">
- <Setter Property="Margin" Value="-32,0,0,0" />
- <Setter Property="HorizontalAlignment" Value="Left" />
- <Setter Property="VerticalAlignment" Value="Top" />
- <Setter Property="ClipToBounds" Value="False" />
- <Setter Property="IsHitTestVisible" Value="True" />
- <Setter Property="Template">
- <ControlTemplate>
- <Panel Background="Transparent" x:DataType="receive:AddressViewModel">
- <c:AnimatedButton Classes="addressActionButton" DockPanel.Dock="Right"
- ToolTip.Tip="Copy"
- Command="{Binding CopyAddressCommand}"
- NormalIcon="{StaticResource copy_regular}"
- ClickIcon="{StaticResource copy_confirmed}"
- InitialOpacity="1.0" />
- </Panel>
- </ControlTemplate>
- </Setter>
- </Style>
</DataBox.Styles>
-
<DataBox.Columns>
<DataBoxTemplateColumn Width="70"
CanUserSort="True">
<DataTemplate>
<DockPanel LastChildFill="True" Margin="10 0" x:DataType="receive:AddressViewModel">
+ <c:AnimatedButton Classes="addressActionButton" DockPanel.Dock="Right"
+ ToolTip.Tip="Copy"
+ Command="{Binding CopyAddressCommand}"
+ NormalIcon="{StaticResource copy_regular}"
+ ClickIcon="{StaticResource copy_confirmed}"
+ InitialOpacity="1.0" />
+
<Button Classes="plain addressActionButton" Command="{Binding NavigateCommand}"
DockPanel.Dock="Right"
ToolTip.Tip="QR Code">

remove adornments