add logic for fading.
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelSelectionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelSelectionViewModel.cs
@@ -83,6 +83,22 @@ public partial class LabelSelectionViewModel : ViewModelBase
}
}
+ public void Fade(LabelViewModel source)
+ {
+ foreach (var lvm in source.IsBlackListed? LabelsBlackList : LabelsWhiteList)
+ {
+ lvm.IsFaded = true;
+ }
+ }
+
+ public void ClearFade(LabelViewModel source)
+ {
+ foreach (var lvm in source.IsBlackListed? LabelsBlackList : LabelsWhiteList)
+ {
+ lvm.IsFaded = false;
+ }
+ }
+
public void OnPointerOver(LabelViewModel labelViewModel)
{
var affectedLabelViewModels = GetAssociatedLabels(labelViewModel);

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelViewModel.cs
@@ -12,12 +12,28 @@ public partial class LabelViewModel : ViewModelBase
[AutoNotify(SetterModifier = AccessModifier.Private)]
private bool _isHighlighted;
+ [AutoNotify(SetterModifier = AccessModifier.Internal)]
+ private bool _isFaded;
+
[AutoNotify] private bool _isPointerOver;
public LabelViewModel(LabelSelectionViewModel owner, string label)
{
Value = label;
+ this.WhenAnyValue(x => x.IsPointerOver)
+ .Subscribe(isPointerOver =>
+ {
+ if (isPointerOver)
+ {
+ owner.Fade(this);
+ }
+ else
+ {
+ owner.ClearFade(this);
+ }
+ });
+
this.WhenAnyValue(x => x.IsPointerOver)
.Skip(1)
.Where(value => value == true)
@@ -34,6 +50,8 @@ public partial class LabelViewModel : ViewModelBase
public void Highlight(LabelViewModel triggerSource)
{
+ IsFaded = false;
+
triggerSource
.WhenAnyValue(x => x.IsPointerOver)
.TakeUntil(value => value == false)

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/PrivacyControlView.axaml
WalletWasabi.Fluent/Views/Wallets/Send/PrivacyControlView.axaml
<ScrollViewer Margin="15,10,15,10">
<ItemsControl Items="{Binding LabelsWhiteList}">
+ <ItemsControl.Styles>
+ <Style Selector="Button.faded">
+ <Setter Property="Opacity" Value="0.5" />
+ </Style>
+ </ItemsControl.Styles>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:LabelViewModel">
- <Button Classes="plain" Margin="5" Command="{Binding ClickedCommand}">
+ <Button Classes="plain" Margin="5" Command="{Binding ClickedCommand}" Classes.faded="{Binding IsFaded}">
<i:Interaction.Behaviors>
<behaviors:BindPointerOverBehavior IsPointerOver="{Binding IsPointerOver}" />
</i:Interaction.Behaviors>
- <c:TagControl Content="{Binding Value}" IsHitTestVisible="False" Background="{DynamicResource PrivacyControlItemBackground}">
- <c:TagControl.Foreground>
- <Binding Path="IsHighlighted">
- <Binding.Converter>
- <converters:BoolToBrushConverter TrueBrush="{DynamicResource PrivacyControlItemWhiteListHighlight}" />
- </Binding.Converter>
- </Binding>
- </c:TagControl.Foreground>
- <c:TagControl.BorderBrush>
- <Binding Path="IsHighlighted">
- <Binding.Converter>
- <converters:BoolToBrushConverter TrueBrush="{DynamicResource PrivacyControlItemWhiteListHighlight}" />
- </Binding.Converter>
- </Binding>
- </c:TagControl.BorderBrush>
- </c:TagControl>
+ <c:TagControl Content="{Binding Value}" IsHitTestVisible="False" Background="{DynamicResource PrivacyControlItemBackground}" />
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>

add logic for fading.