Skip to content

Commit

Permalink
Merge pull request #13067 from soosr/settings-layout-adjustments
Browse files Browse the repository at this point in the history
[UI] Settings layout adjustments
  • Loading branch information
soosr committed May 24, 2024
2 parents 1ec9c1d + 461eb69 commit ca19687
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 73 deletions.
5 changes: 4 additions & 1 deletion WalletWasabi.Fluent/Styles/SettingsLayout.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
</Style>

<Style Selector="StackPanel.settingsLayout > DockPanel > Button">
<Setter Property="Margin" Value="0 0 -12 0" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>

Expand All @@ -30,4 +29,8 @@
<Setter Property="Margin" Value="0 8 0 0" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>

<Style Selector="StackPanel.settingsLayout > StackPanel">
<Setter Property="Spacing" Value="6" />
</Style>
</Styles>
19 changes: 9 additions & 10 deletions WalletWasabi.Fluent/Views/Settings/BitcoinTabSettingsView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
x:CompileBindings="True">
<StackPanel Classes="settingsLayout">

<StackPanel Spacing="10">
<StackPanel>
<TextBlock Text="Network" />
<ComboBox HorizontalAlignment="Stretch"
ItemsSource="{Binding Networks}"
SelectedItem="{Binding Settings.Network}" />
</StackPanel>

<DockPanel>
<TextBlock VerticalAlignment="Center" Text="(EXPERIMENTAL) Run Bitcoin Knots on startup" />
<TextBlock Text="(EXPERIMENTAL) Run Bitcoin Knots on startup" />
<ToggleSwitch IsChecked="{Binding Settings.StartLocalBitcoinCoreOnStartup}" />
</DockPanel>

Expand All @@ -27,25 +27,24 @@
</DockPanel>

<DockPanel IsVisible="{Binding Settings.StartLocalBitcoinCoreOnStartup}">
<TextBlock VerticalAlignment="Center" Text="Local Bitcoin Core/Knots version" />
<TextBlock Text="Local Bitcoin Core/Knots version" />
<Label Content="{Binding BitcoinCoreVersion}" />
</DockPanel>

<StackPanel Spacing="10" IsVisible="{Binding Settings.StartLocalBitcoinCoreOnStartup}">
<StackPanel IsVisible="{Binding Settings.StartLocalBitcoinCoreOnStartup}">
<TextBlock Text="Bitcoin Core/Knots Data Folder" />
<TextBox Text="{Binding Settings.LocalBitcoinCoreDataDir}" />
</StackPanel>

<DockPanel IsVisible="{Binding !Settings.StartLocalBitcoinCoreOnStartup}"
ToolTip.Tip="Wasabi will download blocks from a full node you control.">
<StackPanel IsVisible="{Binding !Settings.StartLocalBitcoinCoreOnStartup}"
ToolTip.Tip="Wasabi will download blocks from a full node you control.">
<TextBlock Text="Bitcoin P2P Endpoint" />
<PrivacyContentControl PrivacyReplacementMode="Text" VerticalAlignment="Bottom" UseOpacity="True">
<PrivacyContentControl PrivacyReplacementMode="Text" UseOpacity="True">
<TextBox Text="{Binding BitcoinP2PEndPoint}" />
</PrivacyContentControl>
</DockPanel>
</StackPanel>

<StackPanel Spacing="10"
ToolTip.Tip="Coins received from others to already used addresses won't appear below this amount. To prevent potential dust attacks.">
<StackPanel ToolTip.Tip="Coins received from others to already used addresses won't appear below this amount. To prevent potential dust attacks.">
<TextBlock Text="Dust Threshold" />
<CurrencyEntryBox Classes="standalone" Text="{Binding DustThreshold}" CurrencyCode="BTC" />
</StackPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,17 @@
</DockPanel>
-->

<DockPanel>
<StackPanel>
<TextBlock Text="Network anonymization (Tor)" />
<ComboBox HorizontalAlignment="Stretch" ItemsSource="{Binding TorModes}" SelectedItem="{Binding Settings.UseTor}" Width="250">
<ComboBox HorizontalAlignment="Stretch" ItemsSource="{Binding TorModes}" SelectedItem="{Binding Settings.UseTor}">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="basemodels:TorMode">
<TextBlock Text="{Binding Converter={x:Static conv:EnumConverters.ToFriendlyName}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</DockPanel>
</StackPanel>

<!--<DockPanel IsVisible="{Binding Settings.UseTor}">-->
<DockPanel IsVisible="{Binding Settings.UseTor, ConverterParameter={x:Static basemodels:TorMode.Enabled}, Converter={x:Static conv:EnumToBoolConverter.Instance}}">
<TextBlock Text="Terminate Tor when Wasabi shuts down" />
<ToggleSwitch IsChecked="{Binding Settings.TerminateTorOnExit}" />
Expand All @@ -66,7 +65,7 @@
<ToggleSwitch IsChecked="{Binding Settings.DownloadNewVersion}" />
</DockPanel>

<StackPanel Spacing="10">
<StackPanel>
<TextBlock Text="Fee display unit" />
<ComboBox HorizontalAlignment="Stretch" ItemsSource="{Binding FeeDisplayUnits}" SelectedItem="{Binding Settings.SelectedFeeDisplayUnit}">
<ComboBox.ItemTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,45 @@
x:Class="WalletWasabi.Fluent.Views.Wallets.Settings.WalletCoinJoinSettingsView"
x:CompileBindings="True">

<StackPanel Spacing="20">
<StackPanel Classes="settingsLayout">

<StackPanel Classes="settingsLayout">
<DockPanel>
<TextBlock Text="Automatically start coinjoin" />
<ToggleSwitch IsChecked="{Binding AutoCoinJoin, Mode=OneWay}" Command="{Binding SetAutoCoinJoin}" />
</DockPanel>

<DockPanel>
<TextBlock Text="Automatically start coinjoin" />
<ToggleSwitch IsChecked="{Binding AutoCoinJoin, Mode=OneWay}" Command="{Binding SetAutoCoinJoin}" />
</DockPanel>
<DockPanel>
<TextBlock Text="Coinjoin strategy:" VerticalAlignment="Center" DockPanel.Dock="Left" Margin="0" />
<Button Theme="{StaticResource AccentButton}" Content="Change" Command="{Binding SelectCoinjoinProfileCommand}" DockPanel.Dock="Right" />
<TextBlock Text="{Binding SelectedCoinjoinProfileName}" VerticalAlignment="Center" MinWidth="120" Margin="10 0 10 0" />
</DockPanel>

<StackPanel Spacing="10"
ToolTip.Tip="Coinjoin will not automatically start if the wallet balance is less than this.">
<TextBlock Text="Auto-start coinjoin threshold" />
<CurrencyEntryBox Classes="standalone" Text="{Binding PlebStopThreshold}" CurrencyCode="BTC" />
</StackPanel>

<DockPanel>
<TextBlock Text="Coinjoin strategy:" VerticalAlignment="Center" DockPanel.Dock="Left" Margin="0" />
<Button Theme="{StaticResource AccentButton}" Content="Change" Command="{Binding SelectCoinjoinProfileCommand}" DockPanel.Dock="Right" />
<TextBlock Text="{Binding SelectedCoinjoinProfileName}" VerticalAlignment="Center" MinWidth="120" Margin="10 0 10 0" />
</DockPanel>

<DockPanel>
<TextBlock Text="Output Wallet" />
<PathIcon Data="{StaticResource warning_regular}" Foreground="{DynamicResource WarningMessageForeground}" Margin="-10,0,10,0" Height="20">
<StackPanel>
<StackPanel Orientation="Horizontal" Spacing="10">
<TextBlock Text="Coinjoin to this wallet:" />
<PathIcon Data="{StaticResource warning_regular}" Foreground="{DynamicResource WarningMessageForeground}" Height="17">
<ToolTip.Tip>
<TextBlock>
- Only loaded wallets can be selected.<LineBreak />
- Coins from the coinjoin transaction will be received by the output wallet. However, this setting resets after Wallet Wasabi restarts.<LineBreak />
- Output wallet cannot be changed when a coinjoin is in progress.
- Coins from the coinjoin transaction will be received by this wallet. However, this setting resets after Wasabi restarts.<LineBreak />
- The selected wallet cannot be changed when a coinjoin is in progress.
</TextBlock>
</ToolTip.Tip>
</PathIcon>
<ComboBox ItemsSource="{Binding Wallets}" IsEnabled="{Binding IsOutputWalletSelectionEnabled}" SelectedItem="{Binding SelectedOutputWallet}" HorizontalAlignment="Stretch">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="wallets1:IWalletModel">
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</DockPanel>
</StackPanel>
<ComboBox ItemsSource="{Binding Wallets}" IsEnabled="{Binding IsOutputWalletSelectionEnabled}" SelectedItem="{Binding SelectedOutputWallet}" HorizontalAlignment="Stretch">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="wallets1:IWalletModel">
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</StackPanel>

<StackPanel ToolTip.Tip="Coinjoin will automatically stop if the wallet balance is less than this.">
<TextBlock Text="Stop coinjoin threshold" />
<CurrencyEntryBox Classes="standalone" Text="{Binding PlebStopThreshold}" CurrencyCode="BTC" />
</StackPanel>

</StackPanel>
</UserControl>
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,28 @@
x:CompileBindings="True"
x:Class="WalletWasabi.Fluent.Views.Wallets.Settings.WalletGeneralSettingsView">

<StackPanel Spacing="20">
<StackPanel Classes="settingsLayout">
<DockPanel>
<TextBlock Text="Name" />
<Button MaxWidth="150"
Command="{Binding RenameCommand}"
Theme="{StaticResource AccentButton}"
ToolTip.Tip="{Binding WalletName}"
DockPanel.Dock="Right">
<Button.Content>
<DockPanel>
<PathIcon Foreground="{DynamicResource AccentButtonForegroundColor}" Margin="8 0 0 0"
DockPanel.Dock="Right" Data="{StaticResource edit_regular}" />
<TextBlock TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" Text="{Binding WalletName, FallbackValue='Wallet name'}" />
</DockPanel>
</Button.Content>
</Button>
</DockPanel>

<StackPanel Classes="settingsLayout">
<DockPanel>
<TextBlock Text="Name" />
<Button MaxWidth="150"
Command="{Binding RenameCommand}"
Theme="{StaticResource AccentButton}"
ToolTip.Tip="{Binding WalletName}"
DockPanel.Dock="Right">
<Button.Content>
<DockPanel>
<PathIcon Foreground="{DynamicResource AccentButtonForegroundColor}" Margin="8 0 0 0"
DockPanel.Dock="Right" Data="{StaticResource edit_regular}" />
<TextBlock TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" Text="{Binding WalletName, FallbackValue='Wallet name'}" />
</DockPanel>
</Button.Content>
</Button>
</DockPanel>
</StackPanel>

<StackPanel Classes="settingsLayout">
<DockPanel IsVisible="{Binding IsHardwareWallet}">
<TextBlock Text="PSBT workflow" />
<ToggleSwitch IsChecked="{Binding PreferPsbtWorkflow}" />
</DockPanel>
</StackPanel>
<DockPanel IsVisible="{Binding IsHardwareWallet}">
<TextBlock Text="PSBT workflow" />
<ToggleSwitch IsChecked="{Binding PreferPsbtWorkflow}" />
</DockPanel>

</StackPanel>

Expand Down

0 comments on commit ca19687

Please sign in to comment.