[Settings]Fix ColorPicker dashboard shortcut (#37547)

* Fix color picker dashboard shortcut

* remove not needed code

* Remove comment
This commit is contained in:
Ionuț Manța
2025-02-24 15:14:45 -08:00
committed by GitHub
parent f2370912f3
commit 744316c400
2 changed files with 2 additions and 10 deletions

View File

@@ -31,7 +31,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
ViewModel = new ColorPickerViewModel(
settingsUtils,
SettingsRepository<GeneralSettings>.GetInstance(settingsUtils),
null,
SettingsRepository<ColorPickerSettings>.GetInstance(settingsUtils),
ShellPage.SendDefaultIPCMessage);
DataContext = ViewModel;
InitializeComponent();

View File

@@ -57,15 +57,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
_settingsUtils = settingsUtils ?? throw new ArgumentNullException(nameof(settingsUtils));
if (colorPickerSettingsRepository == null)
{
// used in release. This method converts the settings stored in the previous form, so we have forwards compatibility
_colorPickerSettings = _settingsUtils.GetSettingsOrDefault<ColorPickerSettings, ColorPickerSettingsVersion1>(ColorPickerSettings.ModuleName, settingsUpgrader: ColorPickerSettings.UpgradeSettings);
}
else
{
_colorPickerSettings = colorPickerSettingsRepository.SettingsConfig; // used in the unit tests
}
_colorPickerSettings = colorPickerSettingsRepository.SettingsConfig;
InitializeEnabledValue();