use light icons on light theme
MODIFY
WalletWasabi.Fluent.Desktop/Program.cs
WalletWasabi.Fluent.Desktop/Program.cs
@@ -74,7 +74,7 @@ namespace WalletWasabi.Fluent.Desktop
Logger.LogSoftwareStarted("Wasabi GUI");
BuildAvaloniaApp()
- .AfterSetup(_ => ThemeHelper.ApplyTheme(Global.UiConfig.DarkModeEnabled))
+ .AfterSetup(_ => ThemeHelper.ApplyTheme(Global.UiConfig.DarkModeEnabled ? Theme.Dark : Theme.Light))
.StartWithClassicDesktopLifetime(args);
}
catch (OperationCanceledException ex)

MODIFY
WalletWasabi.Fluent/Converters/WalletIconConverter.cs
WalletWasabi.Fluent/Converters/WalletIconConverter.cs
@@ -4,6 +4,7 @@ using Avalonia;
using Avalonia.Data.Converters;
using Avalonia.Media.Imaging;
using Avalonia.Platform;
+using WalletWasabi.Fluent.Helpers;
using WalletWasabi.Wallets;
namespace WalletWasabi.Fluent.Converters
@@ -43,25 +44,25 @@ namespace WalletWasabi.Fluent.Converters
private static Bitmap GetBitmap(WalletType type)
{
- Uri uri = new("avares://WalletWasabi.Fluent/Assets/WalletIcons/Dark/generic.png");
+ Uri uri = new($"avares://WalletWasabi.Fluent/Assets/WalletIcons/{ThemeHelper.CurrentTheme}/generic.png");
switch (type)
{
case WalletType.Coldcard:
- uri = new("avares://WalletWasabi.Fluent/Assets/WalletIcons/Dark/coldcard.png");
+ uri = new($"avares://WalletWasabi.Fluent/Assets/WalletIcons/{ThemeHelper.CurrentTheme}/coldcard.png");
break;
case WalletType.Trezor:
- uri = new("avares://WalletWasabi.Fluent/Assets/WalletIcons/Dark/trezor.png");
+ uri = new($"avares://WalletWasabi.Fluent/Assets/WalletIcons/{ThemeHelper.CurrentTheme}/trezor.png");
break;
case WalletType.Ledger:
- uri = new("avares://WalletWasabi.Fluent/Assets/WalletIcons/Dark/ledger.png");
+ uri = new($"avares://WalletWasabi.Fluent/Assets/WalletIcons/{ThemeHelper.CurrentTheme}/ledger.png");
break;
case WalletType.Normal:
case WalletType.Unknown:
- uri = new("avares://WalletWasabi.Fluent/Assets/WalletIcons/Dark/normal.png");
+ uri = new($"avares://WalletWasabi.Fluent/Assets/WalletIcons/{ThemeHelper.CurrentTheme}/normal.png");
break;
}

MODIFY
WalletWasabi.Fluent/Helpers/ThemeHelper.cs
WalletWasabi.Fluent/Helpers/ThemeHelper.cs
@@ -5,9 +5,17 @@ using Avalonia.Markup.Xaml.Styling;
namespace WalletWasabi.Fluent.Helpers
{
+ public enum Theme
+ {
+ Dark,
+ Light
+ }
+
public static class ThemeHelper
{
- public static void ApplyTheme(bool darkMode)
+ public static Theme CurrentTheme { get; private set; }
+
+ public static void ApplyTheme(Theme theme)
{
var currentTheme = Application.Current.Styles.Select(x => (StyleInclude)x).FirstOrDefault(x => x.Source is { } && x.Source.AbsolutePath.Contains("Themes"));
@@ -17,9 +25,10 @@ namespace WalletWasabi.Fluent.Helpers
var newTheme = new StyleInclude(new Uri("avares://WalletWasabi.Fluent/App.axaml"))
{
- Source = new Uri($"avares://WalletWasabi.Fluent/Styles/Themes/{(darkMode ? "BaseDark" : "BaseLight")}.axaml")
+ Source = new Uri($"avares://WalletWasabi.Fluent/Styles/Themes/Base{theme}.axaml")
};
+ CurrentTheme = theme;
Application.Current.Styles[themeIndex] = newTheme;
}
}

use light icons on light theme