shield context menu removed, anonymity set text added to target groupbox
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml
</Grid>
</controls:GroupBox>
<controls:GroupBox Grid.Row="0" Grid.Column="1" Title="Target" Padding="5" Margin="5 0">
- <Panel>
- <Panel.Styles>
- <StyleInclude Source="resm:WalletWasabi.Gui.Icons.Icons.xaml?assembly=WalletWasabi.Gui" />
- </Panel.Styles>
- <Panel.ContextMenu>
- <ContextMenu>
- <MenuItem Header="Set anonimity level target to Some" Command="{Binding PrivacySomeCommand}">
- <!--<MenuItem.Icon>
- <DrawingPresenter Drawing="{Binding PrivacySome}" Margin="0 0 25 0" />
- </MenuItem.Icon>-->
- </MenuItem>
- <MenuItem Header="Set anonimity level target to Fine" Command="{Binding PrivacyFineCommand}">
- <!--<MenuItem.Icon>
- <DrawingPresenter Drawing="{Binding FineShieldIcon}" Margin="0 0 25 0" />
- </MenuItem.Icon>-->
- </MenuItem>
- <MenuItem Header="Set anonimity level target to Strong" Command="{Binding PrivacyStrongCommand}">
- <!--<MenuItem.Icon>
- <DrawingPresenter Drawing="{Binding StrongShieldIcon}" Margin="0 0 25 0" />
- </MenuItem.Icon>-->
- </MenuItem>
- </ContextMenu>
- </Panel.ContextMenu>
- <Button Click="TargetButton_Click">
- <Panel Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent" DataContext="{Binding CoinJoinUntilAnonimitySet, Converter={StaticResource PrivacyLevelValueConverter}}" ToolTip.Tip="{Binding ToolTip}">
+ <Button Command="{Binding TargetButtonCommand}">
+ <Panel Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent" DataContext="{Binding CoinJoinUntilAnonimitySet, Converter={StaticResource PrivacyLevelValueConverter}}">
<DrawingPresenter Drawing="{Binding Icon}" VerticalAlignment="Center" Height="100" Width="75" />
+ <TextBlock Text="{Binding ToolTip}" VerticalAlignment="Bottom" />
</Panel>
</Button>
- </Panel>
</controls:GroupBox>
</Grid>
</Grid>

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml.cs
@@ -14,12 +14,5 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
AvaloniaXamlLoader.Load(this);
}
-
- private void TargetButton_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
- {
- var panel = ((Button)sender).Parent as Panel;
- if (panel == null) return;
- panel.ContextMenu.Open(panel);
- }
}
}

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
@@ -120,6 +120,27 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
TargetPrivacy = TargetPrivacy.Strong;
});
+ TargetButtonCommand = ReactiveCommand.Create(() =>
+ {
+ switch (TargetPrivacy)
+ {
+ case TargetPrivacy.None:
+ TargetPrivacy = TargetPrivacy.Some;
+ break;
+
+ case TargetPrivacy.Some:
+ TargetPrivacy = TargetPrivacy.Fine;
+ break;
+
+ case TargetPrivacy.Fine:
+ TargetPrivacy = TargetPrivacy.Strong;
+ break;
+
+ case TargetPrivacy.Strong:
+ TargetPrivacy = TargetPrivacy.Some;
+ break;
+ }
+ });
this.WhenAnyValue(x => x.Password).Subscribe(async x =>
{
@@ -492,5 +513,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public ReactiveCommand PrivacySomeCommand { get; }
public ReactiveCommand PrivacyFineCommand { get; }
public ReactiveCommand PrivacyStrongCommand { get; }
+ public ReactiveCommand TargetButtonCommand { get; }
}
}

shield context menu removed, anonymity set text added to target groupbox