mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[New utility]Sysinternals ZoomIt (#35880)
* ZoomIt initial code dump * Change vcxproj to normalize dependency versions * Fix code quality to build * Add to PowerToys solution * Clean out C-style casts * Fix some more analyzer errors * Constexpr a function * Disable some warnings locally that it seemed better not to touch * Add ZoomIt module interface * Add GPO * Add Settings page with Enable button * Output as PowerToys.ZoomIt.exe * Extract ZoomIt Settings definition to its own header * Make ZoomItModuleInterface build with ZoomItSettings too * WinRT C++ interop for ZoomItSettings * From Registry To PowerToys Json * Properly fix const_cast analyzer error * Initial Settings page loading from registry * Zoom mode settings * Save settings * Add file picker and DemoType file support * Remaining DemoType settings * Have ZoomIt properly reloading Settings and exiting * Remove context menu entries for Options and Exit * ZoomIt simple Break Options * Break advanced options * Simple Record settings * Record Microphone setting * Fix break background file picker title * Font setting * Fix build issues after merge * Add ZoomIt conflict warning to Settings * Exclude Eula from spell checking * Fix spellcheck errors * Fix spell check for accelerated menu items * Remove cursor files from spellcheck. They're binary * Fix forbidden patterns * Fix XAML style * Fix C# analyzers * Fix signing * Also sign module interface dll * Use actual ZoomIt icon * Add OOBE page for ZoomIt * ZoomIt image for Settings * Flyout and Dashboard entries * Fix type speed slider labels * Correctly load default Font * Correctly register shortcuts on ZoomIt startup first run * Fix modifier keys not changing until restart * Show MsgBox on taken shortcut * Start PowerToys Settings * Normalize ZoomIt file properties with rest of PowerToys * Add attribution * Add ZoomIt team to Community.md * More copyright adjustments * Fix spellcheck * Fix MsgBox simultaneous instance to the front * Add mention of capturevideosample code use * Add ZoomIt to process lists * Add telemetry * Add logging * React to gpo * Normalize code to space identation * Fix installer build * Localize percent setting * Fix XAML styling * Update src/settings-ui/Settings.UI/Strings/en-us/Resources.resw Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> * Fix spellcheck * One more spellcheck fix * Integrate LiveDraw feature changes from upstream * Fix name reuse in same scope * Fix c-style casts * Also register LIVEDRAW_HOTKEY * Fix newLiveZoomToggleKey * Update LiveZoom description in Settings to take LiveDraw into account * Fix spellcheck * Fix more spellcheck * Fix Sysinternals capitalization * Fix ARM64 Debug build * Support Sysinternals build (#36873) * Remove unneeded files * Make build compatible with Sysinternals * Separate PowerToys ZoomIt product name (#36887) * Separate PowerToys ZoomIt product name To help maintain the Sysinternals branding in the standalone version. * Clarify branding-related includes * Remove ZoomIt.sln * Add foxmsft to spell-check names * Add ZoomIt to README * Add ZoomIt to GH templates * Add ZoomIt events to DATA_AND_PRIVACY.md * Remove publish_config.json * Remove publish_config.json from vcxproj too --------- Co-authored-by: Mark Russinovich <markruss@microsoft.com> Co-authored-by: Alex Mihaiuc <69110671+foxmsft@users.noreply.github.com> Co-authored-by: John Stephens <johnstep@microsoft.com> Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
This commit is contained in:
@@ -161,6 +161,10 @@
|
||||
x:Uid="Shell_Workspaces"
|
||||
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/Workspaces.png}"
|
||||
Tag="Workspaces" />
|
||||
<NavigationViewItem
|
||||
x:Uid="Shell_ZoomIt"
|
||||
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/ZoomIt.png}"
|
||||
Tag="ZoomIt" />
|
||||
</NavigationView.MenuItems>
|
||||
<NavigationView.FooterMenuItems>
|
||||
<NavigationViewItem
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
Modules.Insert((int)PowerToysModules.CmdNotFound, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "CmdNotFound",
|
||||
IsNew = true,
|
||||
IsNew = false,
|
||||
});
|
||||
Modules.Insert((int)PowerToysModules.ColorPicker, new OobePowerToysModule()
|
||||
{
|
||||
@@ -101,12 +101,12 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
Modules.Insert((int)PowerToysModules.CropAndLock, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "CropAndLock",
|
||||
IsNew = true,
|
||||
IsNew = false,
|
||||
});
|
||||
Modules.Insert((int)PowerToysModules.EnvironmentVariables, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "EnvironmentVariables",
|
||||
IsNew = true,
|
||||
IsNew = false,
|
||||
});
|
||||
Modules.Insert((int)PowerToysModules.FancyZones, new OobePowerToysModule()
|
||||
{
|
||||
@@ -116,7 +116,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
Modules.Insert((int)PowerToysModules.FileLocksmith, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "FileLocksmith",
|
||||
IsNew = true,
|
||||
IsNew = false,
|
||||
});
|
||||
Modules.Insert((int)PowerToysModules.FileExplorer, new OobePowerToysModule()
|
||||
{
|
||||
@@ -141,12 +141,12 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
Modules.Insert((int)PowerToysModules.MouseWithoutBorders, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "MouseWithoutBorders",
|
||||
IsNew = true,
|
||||
IsNew = false,
|
||||
});
|
||||
Modules.Insert((int)PowerToysModules.Peek, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "Peek",
|
||||
IsNew = true,
|
||||
IsNew = false,
|
||||
});
|
||||
Modules.Insert((int)PowerToysModules.PowerRename, new OobePowerToysModule()
|
||||
{
|
||||
@@ -183,13 +183,13 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
Modules.Insert((int)PowerToysModules.Hosts, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "Hosts",
|
||||
IsNew = true,
|
||||
IsNew = false,
|
||||
});
|
||||
|
||||
Modules.Insert((int)PowerToysModules.Workspaces, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "Workspaces",
|
||||
IsNew = false,
|
||||
IsNew = true,
|
||||
});
|
||||
|
||||
Modules.Insert((int)PowerToysModules.WhatsNew, new OobePowerToysModule()
|
||||
@@ -201,7 +201,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
Modules.Insert((int)PowerToysModules.RegistryPreview, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "RegistryPreview",
|
||||
IsNew = true,
|
||||
IsNew = false,
|
||||
});
|
||||
|
||||
Modules.Insert((int)PowerToysModules.NewPlus, new OobePowerToysModule()
|
||||
@@ -209,6 +209,12 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
ModuleName = "NewPlus",
|
||||
IsNew = true,
|
||||
});
|
||||
|
||||
Modules.Insert((int)PowerToysModules.ZoomIt, new OobePowerToysModule()
|
||||
{
|
||||
ModuleName = "ZoomIt",
|
||||
IsNew = true,
|
||||
});
|
||||
}
|
||||
|
||||
public void OnClosing()
|
||||
@@ -288,6 +294,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
case "Peek": NavigationFrame.Navigate(typeof(OobePeek)); break;
|
||||
case "NewPlus": NavigationFrame.Navigate(typeof(OobeNewPlus)); break;
|
||||
case "Workspaces": NavigationFrame.Navigate(typeof(OobeWorkspaces)); break;
|
||||
case "ZoomIt": NavigationFrame.Navigate(typeof(OobeZoomIt)); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<Page
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeZoomIt"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:tk7controls="using:CommunityToolkit.WinUI.UI.Controls"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<controls:OOBEPageControl x:Uid="Oobe_ZoomIt" HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/ZoomIt.gif">
|
||||
<controls:OOBEPageControl.PageContent>
|
||||
<StackPanel Orientation="Vertical" Spacing="12">
|
||||
<TextBlock x:Uid="Oobe_HowToUse" Style="{ThemeResource OobeSubtitleStyle}" />
|
||||
|
||||
<tk7controls:MarkdownTextBlock x:Uid="Oobe_ZoomIt_HowToUse" Background="Transparent" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<Button x:Uid="OOBE_Settings" Click="SettingsLaunchButton_Click" />
|
||||
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_ZoomIt" Style="{StaticResource TextButtonStyle}">
|
||||
<TextBlock x:Uid="LearnMore_ZoomIt" TextWrapping="Wrap" />
|
||||
</HyperlinkButton>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:OOBEPageControl.PageContent>
|
||||
</controls:OOBEPageControl>
|
||||
</Page>
|
||||
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.OOBE.Enums;
|
||||
using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel;
|
||||
using Microsoft.PowerToys.Settings.UI.Views;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
{
|
||||
public sealed partial class OobeZoomIt : Page
|
||||
{
|
||||
public OobePowerToysModule ViewModel { get; set; }
|
||||
|
||||
public OobeZoomIt()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
ViewModel = new OobePowerToysModule(OobeShellPage.OobeShellHandler.Modules[(int)PowerToysModules.ZoomIt]);
|
||||
DataContext = ViewModel;
|
||||
}
|
||||
|
||||
private void SettingsLaunchButton_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
if (OobeShellPage.OpenMainWindowCallback != null)
|
||||
{
|
||||
OobeShellPage.OpenMainWindowCallback(typeof(ZoomItPage));
|
||||
}
|
||||
|
||||
ViewModel.LogOpeningSettingsEvent();
|
||||
}
|
||||
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
ViewModel.LogOpeningModuleEvent();
|
||||
}
|
||||
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
ViewModel.LogClosingModuleEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user