Flyout and Dashboard entries
Some checks are pending
Spell checking / Spell checking (push) Waiting to run
Spell checking / Report (Push) (push) Blocked by required conditions
Spell checking / Report (PR) (push) Blocked by required conditions
Spell checking / Update PR (push) Waiting to run

This commit is contained in:
Jaime Bernardo 2024-11-12 15:35:03 +00:00
parent 1440e3a475
commit 5c5cb57af0
8 changed files with 29 additions and 0 deletions

View File

@ -32,6 +32,7 @@ namespace Common.UI
Dashboard,
AdvancedPaste,
Workspaces,
ZoomIt,
}
private static string SettingsWindowNameToString(SettingsWindow value)
@ -80,6 +81,8 @@ namespace Common.UI
return "AdvancedPaste";
case SettingsWindow.Workspaces:
return "Workspaces";
case SettingsWindow.ZoomIt:
return "ZoomIt";
default:
{
return string.Empty;

View File

@ -32,5 +32,6 @@ namespace ManagedCommon
ShortcutGuide,
PowerOCR,
Workspaces,
ZoomIt,
}
}

View File

@ -696,6 +696,8 @@ std::string ESettingsWindowNames_to_string(ESettingsWindowNames value)
return "AdvancedPaste";
case ESettingsWindowNames::NewPlus:
return "NewPlus";
case ESettingsWindowNames::ZoomIt:
return "ZoomIt";
default:
{
Logger::error(L"Can't convert ESettingsWindowNames value={} to string", static_cast<int>(value));
@ -795,6 +797,10 @@ ESettingsWindowNames ESettingsWindowNames_from_string(std::string value)
{
return ESettingsWindowNames::NewPlus;
}
else if (value == "ZoomIt")
{
return ESettingsWindowNames::ZoomIt;
}
else
{
Logger::error(L"Can't convert string value={} to ESettingsWindowNames", winrt::to_hstring(value));

View File

@ -26,6 +26,7 @@ enum class ESettingsWindowNames
EnvironmentVariables,
AdvancedPaste,
NewPlus,
ZoomIt,
};
std::string ESettingsWindowNames_to_string(ESettingsWindowNames value);

View File

@ -72,6 +72,7 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
case ModuleType.MeasureTool: return generalSettingsConfig.Enabled.MeasureTool;
case ModuleType.ShortcutGuide: return generalSettingsConfig.Enabled.ShortcutGuide;
case ModuleType.PowerOCR: return generalSettingsConfig.Enabled.PowerOcr;
case ModuleType.ZoomIt: return generalSettingsConfig.Enabled.ZoomIt;
default: return false;
}
}
@ -106,6 +107,7 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
case ModuleType.MeasureTool: generalSettingsConfig.Enabled.MeasureTool = isEnabled; break;
case ModuleType.ShortcutGuide: generalSettingsConfig.Enabled.ShortcutGuide = isEnabled; break;
case ModuleType.PowerOCR: generalSettingsConfig.Enabled.PowerOcr = isEnabled; break;
case ModuleType.ZoomIt: generalSettingsConfig.Enabled.ZoomIt = isEnabled; break;
}
}
@ -139,6 +141,7 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
case ModuleType.MeasureTool: return GPOWrapper.GetConfiguredScreenRulerEnabledValue();
case ModuleType.ShortcutGuide: return GPOWrapper.GetConfiguredShortcutGuideEnabledValue();
case ModuleType.PowerOCR: return GPOWrapper.GetConfiguredTextExtractorEnabledValue();
case ModuleType.ZoomIt: return GPOWrapper.GetConfiguredZoomItEnabledValue();
default: return GpoRuleConfigured.Unavailable;
}
}
@ -173,6 +176,7 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
ModuleType.MeasureTool => typeof(MeasureToolPage),
ModuleType.ShortcutGuide => typeof(ShortcutGuidePage),
ModuleType.PowerOCR => typeof(PowerOcrPage),
ModuleType.ZoomIt => typeof(ZoomItPage),
_ => typeof(DashboardPage), // never called, all values listed above
};
}

View File

@ -442,6 +442,7 @@ namespace Microsoft.PowerToys.Settings.UI
case "EnvironmentVariables": return typeof(EnvironmentVariablesPage);
case "NewPlus": return typeof(NewPlusPage);
case "Workspaces": return typeof(WorkspacesPage);
case "ZoomIt": return typeof(ZoomItPage);
default:
// Fallback to Dashboard
Debug.Assert(false, "Unexpected SettingsWindow argument value");

View File

@ -4476,6 +4476,9 @@ Activate by holding the key for the character you want to add an accent to, then
<value>ZoomIt is a screen zoom, annotation, and recording tool for technical presentations and demos. You can also use ZoomIt to snip screenshots to the clipboard or to a file.</value>
<comment>{Locked="ZoomIt"}</comment>
</data>
<data name="ZoomIt_ShortDescription" xml:space="preserve">
<value>a screen zoom, annotation, and recording tool for technical presentations and demos.</value>
</data>
<data name="ZoomIt.ModuleTitle" xml:space="preserve">
<value>ZoomIt</value>
<comment>{Locked="ZoomIt"}</comment>

View File

@ -195,6 +195,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
ModuleType.ShortcutGuide => GetModuleItemsShortcutGuide(),
ModuleType.PowerOCR => GetModuleItemsPowerOCR(),
ModuleType.NewPlus => GetModuleItemsNewPlus(),
ModuleType.ZoomIt => GetModuleItemsZoomIt(),
_ => new ObservableCollection<DashboardModuleItem>(), // never called, all values listed above
};
}
@ -521,6 +522,15 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
return new ObservableCollection<DashboardModuleItem>(list);
}
private ObservableCollection<DashboardModuleItem> GetModuleItemsZoomIt()
{
var list = new List<DashboardModuleItem>
{
new DashboardModuleTextItem() { Label = resourceLoader.GetString("ZoomIt_ShortDescription") },
};
return new ObservableCollection<DashboardModuleItem>(list);
}
internal void SWVersionButtonClicked()
{
NavigationService.Navigate(typeof(GeneralPage));