mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
update subtitle's setting type display to System settings/Control Panel
This commit is contained in:
parent
0b725eb02c
commit
aad4fc1973
1 changed files with 11 additions and 2 deletions
|
|
@ -91,7 +91,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper
|
|||
{
|
||||
Action = _ => DoOpenSettingsAction(entry),
|
||||
IcoPath = type == "AppSettingsApp" ? windowsSettingIconPath : controlPanelIconPath,
|
||||
SubTitle = $"{Resources.Area} \"{entry.Area}\" {Resources.SubtitlePreposition} {entry.Type}",
|
||||
SubTitle = GetSubtitle(entry.Area, type),
|
||||
Title = entry.Name + entry.glyph,
|
||||
ContextData = entry,
|
||||
Score = score
|
||||
|
|
@ -101,6 +101,13 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper
|
|||
return resultList;
|
||||
}
|
||||
|
||||
private static string GetSubtitle(string section, string entryType)
|
||||
{
|
||||
var settingType = entryType == "AppSettingsApp" ? "System settings" : "Control Panel";
|
||||
|
||||
return $"{settingType} > {section}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a tool-tip to the given <see cref="Result"/>, based o the given <see cref="IWindowsSetting"/>.
|
||||
/// </summary>
|
||||
|
|
@ -109,8 +116,10 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper
|
|||
private static void AddOptionalToolTip(WindowsSetting entry, Result result)
|
||||
{
|
||||
var toolTipText = new StringBuilder();
|
||||
|
||||
var settingType = entry.Type == "AppSettingsApp" ? "System settings" : "Control Panel";
|
||||
|
||||
toolTipText.AppendLine($"{Resources.Application}: {entry.Type}");
|
||||
toolTipText.AppendLine($"{Resources.Application}: {settingType}");
|
||||
toolTipText.AppendLine($"{Resources.Area}: {entry.Area}");
|
||||
|
||||
if (entry.AltNames != null && entry.AltNames.Any())
|
||||
|
|
|
|||
Loading…
Reference in a new issue