From 34bcfccb4c55038839d39489c8979a0370a543f6 Mon Sep 17 00:00:00 2001 From: SpoinkyNL Date: Sun, 13 Dec 2020 17:41:57 +0100 Subject: [PATCH] Settings - Fixed start minimized not enabled Wizard - Fixed start minimized not enabled Wizard - Removed unintended black lines Wizard - Change step description so it fits --- .../Settings/Tabs/General/GeneralSettingsTabViewModel.cs | 4 ++++ src/Artemis.UI/Screens/StartupWizard/StartupWizardView.xaml | 3 ++- .../Screens/StartupWizard/Steps/SettingsStepViewModel.cs | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Artemis.UI/Screens/Settings/Tabs/General/GeneralSettingsTabViewModel.cs b/src/Artemis.UI/Screens/Settings/Tabs/General/GeneralSettingsTabViewModel.cs index 743ba70e4..ef5fff9c2 100644 --- a/src/Artemis.UI/Screens/Settings/Tabs/General/GeneralSettingsTabViewModel.cs +++ b/src/Artemis.UI/Screens/Settings/Tabs/General/GeneralSettingsTabViewModel.cs @@ -108,6 +108,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.General { _settingsService.GetSetting("UI.AutoRun", false).Value = value; _settingsService.GetSetting("UI.AutoRun", false).Save(); + NotifyOfPropertyChange(nameof(StartWithWindows)); Task.Run(ApplyAutorun); } } @@ -119,6 +120,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.General { _settingsService.GetSetting("UI.ShowOnStartup", true).Value = !value; _settingsService.GetSetting("UI.ShowOnStartup", true).Save(); + NotifyOfPropertyChange(nameof(StartMinimized)); } } @@ -245,6 +247,8 @@ namespace Artemis.UI.Screens.Settings.Tabs.General File.Delete(autoRunFile); if (StartWithWindows) ShortcutUtilities.Create(autoRunFile, executableFile, "--autorun", new FileInfo(executableFile).DirectoryName, "Artemis", "", ""); + else + StartMinimized = false; } catch (Exception e) { diff --git a/src/Artemis.UI/Screens/StartupWizard/StartupWizardView.xaml b/src/Artemis.UI/Screens/StartupWizard/StartupWizardView.xaml index 7edd2f836..0d959c213 100644 --- a/src/Artemis.UI/Screens/StartupWizard/StartupWizardView.xaml +++ b/src/Artemis.UI/Screens/StartupWizard/StartupWizardView.xaml @@ -15,6 +15,7 @@ Foreground="{DynamicResource MaterialDesignBody}" Background="{DynamicResource MaterialDesignPaper}" FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto" + UseLayoutRounding="True" d:DesignHeight="450" d:DesignWidth="800"> @@ -44,7 +45,7 @@ - + diff --git a/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStepViewModel.cs b/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStepViewModel.cs index 0793e6c52..b1076408c 100644 --- a/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStepViewModel.cs +++ b/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStepViewModel.cs @@ -33,6 +33,7 @@ namespace Artemis.UI.Screens.StartupWizard.Steps { _settingsService.GetSetting("UI.AutoRun", false).Value = value; _settingsService.GetSetting("UI.AutoRun", false).Save(); + NotifyOfPropertyChange(nameof(StartWithWindows)); Task.Run(ApplyAutorun); } } @@ -44,10 +45,10 @@ namespace Artemis.UI.Screens.StartupWizard.Steps { _settingsService.GetSetting("UI.ShowOnStartup", true).Value = !value; _settingsService.GetSetting("UI.ShowOnStartup", true).Save(); + NotifyOfPropertyChange(nameof(StartMinimized)); } } - public ApplicationColorScheme SelectedColorScheme { get => _settingsService.GetSetting("UI.ColorScheme", ApplicationColorScheme.Automatic).Value; @@ -69,6 +70,8 @@ namespace Artemis.UI.Screens.StartupWizard.Steps File.Delete(autoRunFile); if (StartWithWindows) ShortcutUtilities.Create(autoRunFile, executableFile, "--autorun", new FileInfo(executableFile).DirectoryName, "Artemis", "", ""); + else + StartMinimized = false; } catch (Exception e) {