Compare commits

...

3 Commits

Author SHA1 Message Date
Niels Laute
32d627f279 Update MouseUtilsPage.xaml 2025-01-27 17:21:23 +01:00
Niels Laute
ae898cf406 Merge branch 'main' into niels9001/flptux 2025-01-27 15:08:33 +01:00
Niels Laute
0a23ca7761 Updates 2025-01-20 14:12:30 +01:00
10 changed files with 109 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

View File

@@ -17,6 +17,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Enums
FancyZones,
FileLocksmith,
FileExplorer,
FlowPointer,
ImageResizer,
KBM,
MouseUtils,

View File

@@ -20,8 +20,10 @@
<ProjectPriFileName>PowerToys.Settings.pri</ProjectPriFileName>
</PropertyGroup>
<ItemGroup>
<None Remove="Assets\Settings\Icons\FlowPointer.png" />
<None Remove="Assets\Settings\Modules\APDialog.dark.png" />
<None Remove="Assets\Settings\Modules\APDialog.light.png" />
<None Remove="Assets\Settings\Modules\OOBE\FlowPointer.png" />
</ItemGroup>
<ItemGroup>
<Page Remove="SettingsXAML\App.xaml" />

View File

@@ -0,0 +1,26 @@
<Page
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeFlowPointer"
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"
mc:Ignorable="d">
<controls:OOBEPageControl
Title="FlowPointer"
Description="FlowPointer enables Windows control with a single switch, using vertical and horizontal lines to pinpoint and click targets, ensuring precise navigation for all users."
HeroImage="ms-appx:///Assets/Settings/Modules/OOBE/FlowPointer.png">
<controls:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical" Spacing="12">
<controls:ShortcutWithTextLabelControl x:Name="HotkeyControl" Text="to activate FlowPointer" />
<StackPanel Orientation="Horizontal" Spacing="8">
<Button x:Uid="OOBE_Settings" />
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_Peek" Style="{StaticResource TextButtonStyle}">
<TextBlock Text="Learn more about FlowPointer" TextWrapping="Wrap" />
</HyperlinkButton>
</StackPanel>
</StackPanel>
</controls:OOBEPageControl.PageContent>
</controls:OOBEPageControl>
</Page>

View File

@@ -0,0 +1,32 @@
// 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 System.Collections.Generic;
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
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class OobeFlowPointer : Page
{
public OobePowerToysModule ViewModel { get; set; }
public OobeFlowPointer()
{
this.InitializeComponent();
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
HotkeyControl.Keys = new List<object> { 92, "N" };
}
}
}

View File

@@ -101,6 +101,10 @@
x:Uid="Shell_PowerPreview"
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/FileExplorerPreview.png}"
Tag="FileExplorer" />
<NavigationViewItem
Content="FlowPointer"
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/FlowPointer.png}"
Tag="FlowPointer" />
<NavigationViewItem
x:Uid="Shell_Hosts"
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/Hosts.png}"

View File

@@ -123,6 +123,11 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
ModuleName = "FileExplorer",
IsNew = false,
});
Modules.Insert((int)PowerToysModules.FileExplorer, new OobePowerToysModule()
{
ModuleName = "FlowPointer",
IsNew = false,
});
Modules.Insert((int)PowerToysModules.ImageResizer, new OobePowerToysModule()
{
ModuleName = "ImageResizer",
@@ -284,6 +289,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
case "PowerRename": NavigationFrame.Navigate(typeof(OobePowerRename)); break;
case "QuickAccent": NavigationFrame.Navigate(typeof(OobePowerAccent)); break;
case "FileExplorer": NavigationFrame.Navigate(typeof(OobeFileExplorer)); break;
case "FlowPointer": NavigationFrame.Navigate(typeof(OobeFlowPointer)); break;
case "ShortcutGuide": NavigationFrame.Navigate(typeof(OobeShortcutGuide)); break;
case "TextExtractor": NavigationFrame.Navigate(typeof(OobePowerOCR)); break;
case "MouseUtils": NavigationFrame.Navigate(typeof(OobeMouseUtils)); break;

View File

@@ -259,7 +259,7 @@
<controls:SettingsGroup x:Uid="MouseUtils_MousePointerCrosshairs">
<tkcontrols:SettingsCard
x:Uid="MouseUtils_Enable_MousePointerCrosshairs"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/MouseCrosshairs.png}"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/FlowPointer.png}"
IsEnabled="{x:Bind ViewModel.IsMousePointerCrosshairsEnabledGpoConfigured, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=TwoWay}" />
</tkcontrols:SettingsCard>
@@ -358,6 +358,41 @@
</tkcontrols:SettingsCard>
</tkcontrols:SettingsExpander.Items>
</tkcontrols:SettingsExpander>
<tkcontrols:SettingsExpander
Description="Effortless mouse cursor control with a single switch for enhanced accessibility"
Header="Gliding cursor"
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/FlowPointer.png}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="True" />
<tkcontrols:SettingsExpander.Items>
<tkcontrols:SettingsCard
x:Uid="MouseUtils_MousePointerCrosshairs_ActivationShortcut"
Description="Customize the shortcut to activate FlowPointer"
Header="Activation"
HeaderIcon="{ui:FontIcon Glyph=&#xEDA7;}"
IsEnabled="{x:Bind ViewModel.IsMousePointerCrosshairsEnabled, Mode=OneWay}">
<controls:ShortcutControl x:Name="shortcutControl" MinWidth="{StaticResource SettingActionControlMinWidth}" />
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard
Description="Overall crosshair speed"
Header="Travel speed"
HeaderIcon="{ui:FontIcon Glyph=&#xEC4A;}">
<Slider
Maximum="10"
Minimum="0"
Value="8" />
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard
Description="Speed when crosshair slows down"
Header="Delay speed"
HeaderIcon="{ui:FontIcon Glyph=&#xE916;}">
<Slider
Maximum="10"
Minimum="0"
Value="4" />
</tkcontrols:SettingsCard>
</tkcontrols:SettingsExpander.Items>
</tkcontrols:SettingsExpander>
</controls:SettingsGroup>
</StackPanel>
</controls:SettingsPageControl.ModuleContent>

View File

@@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using ManagedCommon;
using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.PowerToys.Settings.UI.Library;
@@ -46,7 +46,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
DataContext = ViewModel;
InitializeComponent();
shortcutControl.HotkeySettings = new HotkeySettings() { Win = true, Code = 78 };
this.MouseUtils_MouseJump_Panel.ViewModel = ViewModel;
}