diff --git a/Emerald/Helpers/Extensions.cs b/Emerald/Helpers/Extensions.cs index fb31e243..6677d301 100644 --- a/Emerald/Helpers/Extensions.cs +++ b/Emerald/Helpers/Extensions.cs @@ -149,9 +149,9 @@ public static string Localize(this string resourceKey) { try { - string s = Windows.ApplicationModel.Resources.ResourceLoader - .GetForViewIndependentUse() - .GetString(resourceKey); + string s = Windows.ApplicationModel.Resources.ResourceLoader + .GetForViewIndependentUse() + .GetString(resourceKey); return string.IsNullOrEmpty(s) ? resourceKey : s; } diff --git a/Emerald/Helpers/Settings/JSON.cs b/Emerald/Helpers/Settings/JSON.cs index 7370ba61..5b98be1f 100644 --- a/Emerald/Helpers/Settings/JSON.cs +++ b/Emerald/Helpers/Settings/JSON.cs @@ -351,7 +351,7 @@ public partial class Appearance : JSON private int _MicaType = 0; [ObservableProperty] - private (int A, int R, int G, int B)? _CustomMicaTintColor; + private Color? _CustomMicaTintColor; [ObservableProperty] diff --git a/Emerald/MainPage.xaml.cs b/Emerald/MainPage.xaml.cs index b95fa021..7e89ba9c 100644 --- a/Emerald/MainPage.xaml.cs +++ b/Emerald/MainPage.xaml.cs @@ -11,27 +11,9 @@ namespace Emerald; public sealed partial class MainPage : Page { - -/* Unmerged change from project 'Emerald (net8.0-windows10.0.22621)' -Before: - private readonly Helpers.Settings.SettingsSystem SS; - public MainPage() -After: - private readonly SettingsSystem SS; - public MainPage() -*/ private readonly Services.SettingsService SS; public MainPage() { - -/* Unmerged change from project 'Emerald (net8.0-windows10.0.22621)' -Before: - SS = ServiceLocator.Current.GetInstance(); - this.InitializeComponent(); -After: - SS = ServiceLocator.Current.GetInstance(); - this.InitializeComponent(); -*/ SS = ServiceLocator.Current.GetInstance(); this.InitializeComponent(); this.Loaded += MainPage_Loaded; @@ -70,9 +52,9 @@ void TintColor() break; case Helpers.Settings.Enums.MicaTintColor.CustomColor: var c = SS.Settings.App.Appearance.CustomMicaTintColor; - MainGrid.Background = new SolidColorBrush() - { - Color = c == null ? Color.FromArgb(255, 234, 0, 94) : Color.FromArgb((byte)c.Value.A, (byte)c.Value.R, (byte)c.Value.G, (byte)c.Value.B), + MainGrid.Background = new SolidColorBrush() + { + Color = c ?? Color.FromArgb(255, 234, 0, 94), Opacity = (double)SS.Settings.App.Appearance.TintOpacity / 100 }; break; diff --git a/Emerald/Views/Settings/AppearancePage.xaml.cs b/Emerald/Views/Settings/AppearancePage.xaml.cs index fb12d138..4a8b5492 100644 --- a/Emerald/Views/Settings/AppearancePage.xaml.cs +++ b/Emerald/Views/Settings/AppearancePage.xaml.cs @@ -76,27 +76,12 @@ public sealed partial class AppearancePage : Page }; -/* Unmerged change from project 'Emerald (net8.0-windows10.0.22621)' -Before: - private readonly Helpers.Settings.SettingsSystem SS; - public AppearancePage() -After: - private readonly SettingsSystem SS; - public AppearancePage() -*/ private readonly Services.SettingsService SS; public AppearancePage() { InitializeComponent(); this.Log().Info("Initializing AppearancePage..."); - -/* Unmerged change from project 'Emerald (net8.0-windows10.0.22621)' -Before: - SS = ServiceLocator.Current.GetInstance(); -After: - SS = ServiceLocator.Current.GetInstance(); -*/ SS = ServiceLocator.Current.GetInstance(); if (SS.Settings.App.Appearance.MicaTintColor == (int)Helpers.Settings.Enums.MicaTintColor.CustomColor) @@ -126,7 +111,7 @@ private void GVColorList_SelectionChanged(object sender, SelectionChangedEventAr { var c = TintColorsList[GVColorList.SelectedIndex]; SS.Settings.App.Appearance.MicaTintColor = (int)Helpers.Settings.Enums.MicaTintColor.CustomColor; - SS.Settings.App.Appearance.CustomMicaTintColor = (c.A, c.R, c.G, c.B); + SS.Settings.App.Appearance.CustomMicaTintColor = c; this.Log().Info($"Selected tint color changed to: {c}");