From c1ee36bb43d8a175d21ebe1d66bc27827784ea32 Mon Sep 17 00:00:00 2001 From: Benjamin Popp Date: Sat, 27 Apr 2019 21:50:35 -0500 Subject: [PATCH] improve defaults fix a bug that prevented you from showing the theme window twice --- src/HexManiac.Core/ViewModels/EditorViewModel.cs | 2 +- src/HexManiac.Core/ViewModels/Theme.cs | 4 ++-- src/HexManiac.WPF/Windows/MainWindow.xaml.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/HexManiac.Core/ViewModels/EditorViewModel.cs b/src/HexManiac.Core/ViewModels/EditorViewModel.cs index 1da24a2d..11e6cc22 100644 --- a/src/HexManiac.Core/ViewModels/EditorViewModel.cs +++ b/src/HexManiac.Core/ViewModels/EditorViewModel.cs @@ -231,7 +231,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels { var metadata = fileSystem.MetadataFor(ApplicationName) ?? new string[0]; Theme = new Theme(metadata); - ShowMatrix = metadata.Contains("ShowMatrixGrid = True"); + ShowMatrix = !metadata.Contains("ShowMatrixGrid = False"); } public void WriteAppLevelMetadata() { diff --git a/src/HexManiac.Core/ViewModels/Theme.cs b/src/HexManiac.Core/ViewModels/Theme.cs index 7dfad1aa..ad646aaa 100644 --- a/src/HexManiac.Core/ViewModels/Theme.cs +++ b/src/HexManiac.Core/ViewModels/Theme.cs @@ -5,8 +5,8 @@ using System.Linq; namespace HavenSoft.HexManiac.Core.ViewModels { public class Theme : ViewModelCore { - private string lightColor = "#EEE", darkColor = "#111"; - private double hueOffset = 0.3, accentSaturation = 0.6, accentValue = 0.9, highlightBrightness = 0.9; + private string lightColor = "#DDDDDD", darkColor = "#080808"; + private double hueOffset = 0.3, accentSaturation = 0.4, accentValue = 0.7, highlightBrightness = 0.7; private bool lightVariant; public bool LightVariant { diff --git a/src/HexManiac.WPF/Windows/MainWindow.xaml.cs b/src/HexManiac.WPF/Windows/MainWindow.xaml.cs index ccd47464..fd8b17bc 100644 --- a/src/HexManiac.WPF/Windows/MainWindow.xaml.cs +++ b/src/HexManiac.WPF/Windows/MainWindow.xaml.cs @@ -191,7 +191,7 @@ namespace HavenSoft.HexManiac.WPF.Windows { } private void ShowThemeSelector(object sender, RoutedEventArgs e) { - if (themeWindow?.Visibility != Visibility.Visible) { + if (themeWindow?.IsVisible != true) { themeWindow = new ThemeSelector { DataContext = ViewModel.Theme }; themeWindow.Show(); }