Move to Advanced settings tab
MODIFY
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
@@ -170,6 +170,12 @@ public partial class MainViewModel : ViewModelBase
return _settingsPage;
});
+ AdvancedSettingsTabViewModel.RegisterLazy(() =>
+ {
+ _settingsPage.SelectedTab = 2;
+ return _settingsPage;
+ });
+
AboutViewModel.RegisterLazy(() => new AboutViewModel());
BroadcasterViewModel.RegisterLazy(() => new BroadcasterViewModel());
LegalDocumentsViewModel.RegisterLazy(() => new LegalDocumentsViewModel());

MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/Sources/SettingsSource.cs
WalletWasabi.Fluent/ViewModels/SearchBar/Sources/SettingsSource.cs
@@ -34,7 +34,7 @@ public class SettingsSource : ISearchItemSource
new NonActionableSearchItem(new Setting<GeneralSettingsTabViewModel, bool>(_settingsPage.GeneralSettingsTab, b => b.TerminateTorOnExit), "Terminate Tor when Wasabi shuts down", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
new NonActionableSearchItem(new Setting<BitcoinTabSettingsViewModel, bool>(_settingsPage.BitcoinTabSettings, b => b.StartLocalBitcoinCoreOnStartup), "Run Bitcoin Knots on startup", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
new NonActionableSearchItem(new Setting<BitcoinTabSettingsViewModel, bool>(_settingsPage.BitcoinTabSettings, b => b.StopLocalBitcoinCoreOnShutdown), "Stop Bitcoin Knots on shutdown", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
- new NonActionableSearchItem(new Setting<GeneralSettingsTabViewModel, bool>(_settingsPage.GeneralSettingsTab, b => b.EnableGpu), "Enable GPU", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
+ new NonActionableSearchItem(new Setting<AdvancedSettingsTabViewModel, bool>(_settingsPage.AdvancedSettingsTab, b => b.EnableGpu), "Enable GPU", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
};
}
}

ADD
WalletWasabi.Fluent/ViewModels/Settings/AdvancedSettingsTabViewModel.cs
+using System.Collections.Generic;
+using System.Linq;
+using System.Reactive.Linq;
+using ReactiveUI;
+using WalletWasabi.Fluent.Helpers;
+using WalletWasabi.Fluent.Models;
+using WalletWasabi.Logging;
+using System.Windows.Input;
+
+namespace WalletWasabi.Fluent.ViewModels.Settings;
+
+[NavigationMetaData(
+ Title = "Advanced",
+ Caption = "Manage advanced settings",
+ Order = 2,
+ Category = "Settings",
+ Keywords = new[]
+ {
+ "Settings", "Advanced", "Enable", "GPU"
+ },
+ IconName = "settings_general_regular")]
+public partial class AdvancedSettingsTabViewModel : SettingsTabViewModelBase
+{
+ [AutoNotify] private bool _enableGpu;
+
+ public AdvancedSettingsTabViewModel()
+ {
+ _enableGpu = Services.Config.EnableGpu;
+
+ this.WhenAnyValue(x => x.EnableGpu)
+ .ObserveOn(RxApp.TaskpoolScheduler)
+ .Throttle(TimeSpan.FromMilliseconds(ThrottleTime))
+ .Skip(1)
+ .Subscribe(_ => Save());
+ }
+
+ protected override void EditConfigOnSave(Config config)
+ {
+ config.EnableGpu = EnableGpu;
+ }
+}

MODIFY
WalletWasabi.Fluent/ViewModels/Settings/BitcoinTabSettingsViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/BitcoinTabSettingsViewModel.cs
@@ -13,7 +13,7 @@ namespace WalletWasabi.Fluent.ViewModels.Settings;
[NavigationMetaData(
Title = "Bitcoin",
Caption = "Manage Bitcoin settings",
- Order = 3,
+ Order = 1,
Category = "Settings",
Keywords = new[]
{

MODIFY
WalletWasabi.Fluent/ViewModels/Settings/GeneralSettingsTabViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/GeneralSettingsTabViewModel.cs
@@ -17,13 +17,12 @@ namespace WalletWasabi.Fluent.ViewModels.Settings;
Keywords = new[]
{
"Settings", "General", "Bitcoin", "Dark", "Mode", "Run", "Wasabi", "Computer", "System", "Start", "Background", "Close",
- "Auto", "Copy", "Paste", "Addresses", "Custom", "Change", "Address", "Fee", "Display", "Format", "BTC", "sats", "Enable", "GPU"
+ "Auto", "Copy", "Paste", "Addresses", "Custom", "Change", "Address", "Fee", "Display", "Format", "BTC", "sats"
},
IconName = "settings_general_regular")]
public partial class GeneralSettingsTabViewModel : SettingsTabViewModelBase
{
[AutoNotify] private bool _darkModeEnabled;
- [AutoNotify] private bool _enableGpu;
[AutoNotify] private bool _autoCopy;
[AutoNotify] private bool _autoPaste;
[AutoNotify] private bool _customChangeAddress;
@@ -37,7 +36,6 @@ public partial class GeneralSettingsTabViewModel : SettingsTabViewModelBase
public GeneralSettingsTabViewModel()
{
_darkModeEnabled = Services.UiConfig.DarkModeEnabled;
- _enableGpu = Services.Config.EnableGpu;
_autoCopy = Services.UiConfig.Autocopy;
_autoPaste = Services.UiConfig.AutoPaste;
_customChangeAddress = Services.UiConfig.IsCustomChangeAddress;
@@ -102,7 +100,6 @@ public partial class GeneralSettingsTabViewModel : SettingsTabViewModelBase
this.WhenAnyValue(
x => x.UseTor,
x => x.TerminateTorOnExit,
- x => x.EnableGpu,
x => x.DownloadNewVersion)
.ObserveOn(RxApp.TaskpoolScheduler)
.Throttle(TimeSpan.FromMilliseconds(ThrottleTime))
@@ -119,7 +116,6 @@ public partial class GeneralSettingsTabViewModel : SettingsTabViewModelBase
{
config.UseTor = UseTor;
config.TerminateTorOnExit = TerminateTorOnExit;
- config.EnableGpu = EnableGpu;
config.DownloadNewVersion = DownloadNewVersion;
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Settings/SettingsPageViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/SettingsPageViewModel.cs
@@ -34,6 +34,7 @@ public partial class SettingsPageViewModel : DialogViewModelBase<Unit>
GeneralSettingsTab = new GeneralSettingsTabViewModel();
BitcoinTabSettings = new BitcoinTabSettingsViewModel();
+ AdvancedSettingsTab = new AdvancedSettingsTabViewModel();
RestartCommand = ReactiveCommand.Create(AppLifetimeHelper.Restart);
NextCommand = CancelCommand;
@@ -43,6 +44,7 @@ public partial class SettingsPageViewModel : DialogViewModelBase<Unit>
public GeneralSettingsTabViewModel GeneralSettingsTab { get; }
public BitcoinTabSettingsViewModel BitcoinTabSettings { get; }
+ public AdvancedSettingsTabViewModel AdvancedSettingsTab { get; }
private void OnRestartNeeded(object? sender, RestartNeededEventArgs e)
{

ADD
WalletWasabi.Fluent/Views/Settings/AdvancedSettingsTabView.axaml
+<UserControl xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:settings="using:WalletWasabi.Fluent.ViewModels.Settings"
+ mc:Ignorable="d" d:DesignWidth="428" d:DesignHeight="371"
+ x:Class="WalletWasabi.Fluent.Views.Settings.AdvancedSettingsTabView"
+ x:CompileBindings="True"
+ x:DataType="settings:AdvancedSettingsTabViewModel">
+ <StackPanel Classes="settingsLayout">
+
+ <DockPanel>
+ <TextBlock Text="Enable GPU" />
+ <ToggleSwitch IsChecked="{Binding EnableGpu}" />
+ </DockPanel>
+
+ </StackPanel>
+</UserControl>

ADD
WalletWasabi.Fluent/Views/Settings/AdvancedSettingsTabView.axaml.cs
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.Settings;
+
+public class AdvancedSettingsTabView : UserControl
+{
+ public AdvancedSettingsTabView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+}

MODIFY
WalletWasabi.Fluent/Views/Settings/GeneralSettingsTabView.axaml
WalletWasabi.Fluent/Views/Settings/GeneralSettingsTabView.axaml
<ToggleSwitch IsChecked="{Binding DarkModeEnabled}" />
</DockPanel>
- <DockPanel>
- <TextBlock Text="Enable GPU" />
- <ToggleSwitch IsChecked="{Binding EnableGpu}" />
- </DockPanel>
-
<DockPanel>
<TextBlock Text="Run Wasabi when computer starts" />
<ToggleSwitch IsChecked="{Binding RunOnSystemStartup}" Command="{Binding StartupCommand}" />

MODIFY
WalletWasabi.Fluent/Views/Settings/SettingsPageView.axaml
WalletWasabi.Fluent/Views/Settings/SettingsPageView.axaml
<v:BitcoinTabSettingsView DataContext="{Binding BitcoinTabSettings}" />
</ScrollViewer>
</TabItem>
+
+ <TabItem Header="Advanced">
+ <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
+ <v:AdvancedSettingsTabView DataContext="{Binding AdvancedSettingsTab}" />
+ </ScrollViewer>
+ </TabItem>
+
</TabControl>
</DockPanel>
</c:ContentArea>

Move to Advanced settings tab