mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-09-03 04:29:06 +02:00
Re-creation of #46817 from an internal branch to work around stale code-scanning merge protection. ## Original PR See #46817 for full context, discussion, and review history. ## Summary This adds a new toy, GrabAndMove (previously WinPos), that allows dragging (left click) or resizing (right click) of windows while the Alt key is pressed. Closes: #269 ## PR Checklist - [x] Communication: discussed with core contributors - [ ] Tests: Added/updated and all pass - [ ] Localization: All end-user-facing strings can be localized - [ ] Dev docs: Added/updated --------- Co-authored-by: foxmsft <foxmsft@hotmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Muyuan Li (from Dev Box) <muyuanli@microsoft.com> Co-authored-by: Niels Laute <niels.laute@live.nl> Co-authored-by: Alex Mihaiuc <amihaiuc@microsoft.com>
33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
// 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.Reflection;
|
|
using System.Text.Json.Serialization;
|
|
using ManagedCommon;
|
|
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
|
{
|
|
public class GrabAndMoveSettings : BasePTModuleSettings, ISettingsConfig
|
|
{
|
|
public const string ModuleName = "GrabAndMove";
|
|
|
|
public GrabAndMoveSettings()
|
|
{
|
|
Name = ModuleName;
|
|
Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
Properties = new GrabAndMoveProperties();
|
|
}
|
|
|
|
[JsonPropertyName("properties")]
|
|
public GrabAndMoveProperties Properties { get; set; }
|
|
|
|
public string GetModuleName() => Name;
|
|
|
|
public bool UpgradeSettingsConfiguration() => false;
|
|
|
|
public ModuleType GetModuleType() => ModuleType.GrabAndMove;
|
|
}
|
|
}
|