diff --git a/src/modules/ZoomIt/ZoomIt/Zoomit.cpp b/src/modules/ZoomIt/ZoomIt/Zoomit.cpp index cf0824ada2..bc476155af 100644 --- a/src/modules/ZoomIt/ZoomIt/Zoomit.cpp +++ b/src/modules/ZoomIt/ZoomIt/Zoomit.cpp @@ -1812,7 +1812,7 @@ INT_PTR CALLBACK OptionsTabProc( HWND hDlg, UINT message, // Check if GIF is selected by comparing the text bool isGifSelected = (wcscmp(selectedText, L"GIF") == 0); - // if gif is selected set the scaling to the g_recordScaleGIF value otherwise to the g_recordScaleMP4 value + // If GIF is selected, set the scaling to the g_RecordScalingGIF value; otherwise to the g_RecordScalingMP4 value if (isGifSelected) { g_RecordScaling = g_RecordScalingGIF; diff --git a/src/settings-ui/Settings.UI/ViewModels/ZoomItViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/ZoomItViewModel.cs index 2d93deef81..e1704e16fb 100644 --- a/src/settings-ui/Settings.UI/ViewModels/ZoomItViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/ZoomItViewModel.cs @@ -24,6 +24,9 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels { public class ZoomItViewModel : Observable { + private const string FormatGif = "GIF"; + private const string FormatMp4 = "MP4"; + private ISettingsUtils SettingsUtils { get; set; } private GeneralSettings GeneralSettingsConfig { get; set; } @@ -656,12 +659,12 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels { get { - if (_zoomItSettings.Properties.RecordFormat.Value == "GIF") + if (_zoomItSettings.Properties.RecordFormat.Value == FormatGif) { return 0; } - if (_zoomItSettings.Properties.RecordFormat.Value == "MP4") + if (_zoomItSettings.Properties.RecordFormat.Value == FormatMp4) { return 1; } @@ -672,19 +675,19 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels set { int format = 0; - if (_zoomItSettings.Properties.RecordFormat.Value == "GIF") + if (_zoomItSettings.Properties.RecordFormat.Value == FormatGif) { format = 0; } - if (_zoomItSettings.Properties.RecordFormat.Value == "MP4") + if (_zoomItSettings.Properties.RecordFormat.Value == FormatMp4) { format = 1; } if (format != value) { - _zoomItSettings.Properties.RecordFormat.Value = value == 0 ? "GIF" : "MP4"; + _zoomItSettings.Properties.RecordFormat.Value = value == 0 ? FormatGif : FormatMp4; OnPropertyChanged(nameof(RecordFormatIndex)); NotifySettingsChanged();