mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
get rid of the thumbnail setting (#575)
This commit is contained in:
@@ -57,11 +57,10 @@ public sealed partial class AllAppsPage : ListPage
|
||||
Stopwatch stopwatch = new();
|
||||
stopwatch.Start();
|
||||
|
||||
var apps = GetPrograms();
|
||||
List<AppItem> apps = GetPrograms();
|
||||
|
||||
var useThumbnails = AllAppsSettings.Instance.UseThumbnails;
|
||||
this.allAppsSection = apps
|
||||
.Select((app) => new AppListItem(app, useThumbnails))
|
||||
.Select((app) => new AppListItem(app, true))
|
||||
.ToArray();
|
||||
|
||||
this.IsLoading = false;
|
||||
@@ -74,7 +73,7 @@ public sealed partial class AllAppsPage : ListPage
|
||||
|
||||
internal List<AppItem> GetPrograms()
|
||||
{
|
||||
var uwpResults = AppCache.Instance.Value.UWPs
|
||||
IEnumerable<AppItem> uwpResults = AppCache.Instance.Value.UWPs
|
||||
.Where((application) => application.Enabled)
|
||||
.Select(app =>
|
||||
new AppItem()
|
||||
@@ -89,11 +88,11 @@ public sealed partial class AllAppsPage : ListPage
|
||||
Commands = app.GetCommands(),
|
||||
});
|
||||
|
||||
var win32Results = AppCache.Instance.Value.Win32s
|
||||
IEnumerable<AppItem> win32Results = AppCache.Instance.Value.Win32s
|
||||
.Where((application) => application.Enabled && application.Valid)
|
||||
.Select(app =>
|
||||
{
|
||||
var icoPath = string.IsNullOrEmpty(app.IcoPath) ?
|
||||
string icoPath = string.IsNullOrEmpty(app.IcoPath) ?
|
||||
(app.AppType == Win32Program.ApplicationType.InternetShortcutApplication ?
|
||||
app.IcoPath :
|
||||
app.FullPath) :
|
||||
|
||||
@@ -41,8 +41,6 @@ public class AllAppsSettings : JsonSettingsManager
|
||||
|
||||
public bool EnablePathEnvironmentVariableSource => _enablePathEnvironmentVariableSource.Value;
|
||||
|
||||
public bool UseThumbnails => _useThumbnails.Value;
|
||||
|
||||
private readonly ToggleSetting _enableStartMenuSource = new(
|
||||
Namespaced(nameof(EnableStartMenuSource)),
|
||||
Resources.enable_start_menu_source,
|
||||
@@ -67,19 +65,13 @@ public class AllAppsSettings : JsonSettingsManager
|
||||
Resources.enable_path_environment_variable_source,
|
||||
false); // this one is very VERY noisy
|
||||
|
||||
private readonly ToggleSetting _useThumbnails = new(
|
||||
Experimental(nameof(UseThumbnails)),
|
||||
Resources.use_thumbnails_setting_label,
|
||||
Resources.use_thumbnails_setting_description,
|
||||
false); // This one can cause a crash on launch
|
||||
|
||||
public double MinScoreThreshold { get; set; } = 0.75;
|
||||
|
||||
internal const char SuffixSeparator = ';';
|
||||
|
||||
internal static string SettingsJsonPath()
|
||||
{
|
||||
var directory = Utilities.BaseSettingsPath("Microsoft.CmdPal");
|
||||
string directory = Utilities.BaseSettingsPath("Microsoft.CmdPal");
|
||||
Directory.CreateDirectory(directory);
|
||||
|
||||
// now, the state is just next to the exe
|
||||
@@ -94,7 +86,6 @@ public class AllAppsSettings : JsonSettingsManager
|
||||
Settings.Add(_enableDesktopSource);
|
||||
Settings.Add(_enableRegistrySource);
|
||||
Settings.Add(_enablePathEnvironmentVariableSource);
|
||||
Settings.Add(_useThumbnails);
|
||||
|
||||
// Load settings from file upon initialization
|
||||
LoadSettings();
|
||||
|
||||
Reference in New Issue
Block a user