mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-19 22:37:58 +08:00
Merge remote-tracking branch 'origin/main' into dev/snickler/net8-upgrade
This commit is contained in:
commit
ffbc981029
42
README.md
42
README.md
@ -36,7 +36,7 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline
|
||||
|
||||
### Via GitHub with EXE [Recommended]
|
||||
|
||||
Go to [Microsoft PowerToys GitHub releases page][github-release-link], click on `Assets` at the bottom to show the files available in the release. Please use the appropriate PowerToys installer that matches your machine's architecture and install scope. For most, it is `x64` and per-user.
|
||||
Go to the [Microsoft PowerToys GitHub releases page][github-release-link] and click on `Assets` at the bottom to show the files available in the release. Please use the appropriate PowerToys installer that matches your machine's architecture and install scope. For most, it is `x64` and per-user.
|
||||
|
||||
<!-- items that need to be updated release to release -->
|
||||
[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=project%3Amicrosoft%2FPowerToys%2F47
|
||||
@ -79,15 +79,15 @@ There are [community driven install methods](./doc/unofficialInstallMethods.md)
|
||||
|
||||
## Third-Party Run Plugins
|
||||
|
||||
Collection of [third-party plugins](./doc/thirdPartyRunPlugins.md) created by the community that aren't distributed with PowerToys.
|
||||
There is a collection of [third-party plugins](./doc/thirdPartyRunPlugins.md) created by the community that aren't distributed with PowerToys.
|
||||
|
||||
## Contributing
|
||||
|
||||
This project welcomes contributions of all types. Help spec'ing, design, documentation, finding bugs are ways everyone can help on top of coding features / bug fixes. We are excited to work with the power user community to build a set of tools for helping you get the most out of Windows.
|
||||
This project welcomes contributions of all types. Besides coding features / bug fixes, other ways to assist include spec writing, design, documentation, and finding bugs. We are excited to work with the power user community to build a set of tools for helping you get the most out of Windows.
|
||||
|
||||
We ask that **before you start work on a feature that you would like to contribute**, please read our [Contributor's Guide](CONTRIBUTING.md). We will be happy to work with you to figure out the best approach, provide guidance and mentorship throughout feature development, and help avoid any wasted or duplicate effort.
|
||||
We ask that **before you start work on a feature that you would like to contribute**, please read our [Contributor's Guide](CONTRIBUTING.md). We would be happy to work with you to figure out the best approach, provide guidance and mentorship throughout feature development, and help avoid any wasted or duplicate effort.
|
||||
|
||||
Most contributions require you to agree to a [Contributor License Agreement (CLA)][oss-CLA] declaring that you have the right to, and actually do, grant us the rights to use your contribution.
|
||||
Most contributions require you to agree to a [Contributor License Agreement (CLA)][oss-CLA] declaring that you grant us the rights to use your contribution and that you have permission to do so.
|
||||
|
||||
For guidance on developing for PowerToys, please read the [developer docs](/doc/devdocs) for a detailed breakdown. This includes how to setup your computer to compile.
|
||||
|
||||
@ -103,7 +103,7 @@ In this release, we focused on releasing new features, stability and improvement
|
||||
|
||||
**Highlights**
|
||||
|
||||
- Keyboard manager now supports Numpad. Note, with previously bound hotkeys stored in settings.json would only react to non-Numpad keys now. If a user wishes to restore the previous behavior, it could be done by manually adding another binding for the Numpad variant.
|
||||
- Keyboard manager now allows Numpad keys to be bound separately from the main keyboard. If using a previous configuration, only the main keyboard (not numpad) keys will be mapped. To restore the previous behavior, manually add separate bindings for numpad keys.
|
||||
- New utility: Crop And Lock allows you to crop a current application into a smaller window or just create a thumbnail. Focus the target window and press the shortcut to start cropping.
|
||||
- FancyZones code improvements and refactor.
|
||||
- Modernized ImageResizer UX.
|
||||
@ -122,10 +122,10 @@ In this release, we focused on releasing new features, stability and improvement
|
||||
|
||||
### FancyZones
|
||||
|
||||
- Fixed issue causing canvas zones being drawn only when dragging in zone area.
|
||||
- Fixed issue causing canvas zones being drawn only when dragging in the zone area.
|
||||
- Fixed user-defined default layout highlighting issue.
|
||||
- Refactored and improved code quality.
|
||||
- Fixed issue causing wrong layout to be applied when duplicating non-selected layout.
|
||||
- Fixed issue causing the wrong layout to be applied when duplicating a non-selected layout.
|
||||
|
||||
### File Locksmith
|
||||
|
||||
@ -148,11 +148,11 @@ In this release, we focused on releasing new features, stability and improvement
|
||||
### Keyboard Manager
|
||||
|
||||
- Rephrased labels to enhance clarity. Thanks [@Jay-o-Way](https://github.com/Jay-o-Way)!
|
||||
- Keyboard manager now supports Numpad. Note, with previously bound hotkeys stored in settings.json would only react to non-Numpad keys now. If a user wishes to restore the previous behavior, it could be done by manually adding another binding for the Numpad variant.
|
||||
- Keyboard manager now allows Numpad keys to be bound separately from the main keyboard. If using a previous configuration, only the main keyboard (not numpad) keys will be mapped. To restore the previous behavior, manually add separate bindings for numpad keys.
|
||||
|
||||
### Mouse Highlighter
|
||||
|
||||
- Fixed highlighter being invisible issue for Always on Top windows.
|
||||
- The highlighter is now visible in "Always on Top" windows.
|
||||
- Added settings for automatic activation on startup. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
|
||||
### Mouse Pointer Crosshairs
|
||||
@ -162,26 +162,26 @@ In this release, we focused on releasing new features, stability and improvement
|
||||
### Peek
|
||||
|
||||
- Show correct file type for shortcuts. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Fixed issue causing wrong file size to be displayed. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Fixed issue causing the wrong file size to be displayed. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Show 1 byte instead of 1 bytes file size. Thanks [@Deepak-Sangle](https://github.com/Deepak-Sangle)!
|
||||
- Open URIs from developer files in default browser. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Show thumbnail and fallback to icon for unsupported files. Thanks [@pedrolamas](https://github.com/pedrolamas)!
|
||||
- Open URIs from developer files in the default browser. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Show a thumbnail and fallback to an icon for unsupported files. Thanks [@pedrolamas](https://github.com/pedrolamas)!
|
||||
|
||||
### PowerRename
|
||||
|
||||
- Updated OOBE gif. Thanks [@ChaseKnowlden](https://github.com/ChaseKnowlden)!
|
||||
- Localized renamed parts combo box.
|
||||
- Updated the OOBE gif. Thanks [@ChaseKnowlden](https://github.com/ChaseKnowlden)!
|
||||
- Localized the renamed parts combo box.
|
||||
- Introduced advanced counter functionality.
|
||||
- Added remember last window size logic and optimized items sorting.
|
||||
- Added remember last window size logic and optimized sorting of items.
|
||||
- Enable "Enumerate items" option by default.
|
||||
|
||||
### PowerToys Run
|
||||
|
||||
- Fixed issue causing original search to be abandoned when cycling through results.
|
||||
- Fixed an issue causing original search to be abandoned when cycling through results.
|
||||
- Updated device and bluetooth results for Settings plugin. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||
- Fixed InvalidOperationException exception thrown. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
- Add Base64 Decoding function to the Value Generator plugin. Thanks [@LeagueOfPoro](https://github.com/LeagueOfPoro)!
|
||||
- Added Keep shell open option for Shell plugin.
|
||||
- Added a Keep shell open option for Shell plugin.
|
||||
- Added Crop And Lock to PowerToys plugin. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
|
||||
### Registry Preview
|
||||
@ -223,16 +223,16 @@ In this release, we focused on releasing new features, stability and improvement
|
||||
|
||||
#### What is being planned for version 0.74
|
||||
|
||||
For [v0.74][github-next-release-work], we'll work on below:
|
||||
For [v0.74][github-next-release-work], we'll work on the items below:
|
||||
|
||||
- Language selection
|
||||
- Modernize and refresh UX of PowerToys based on WPF
|
||||
- Modernize and refresh the UX of PowerToys based on WPF
|
||||
- Stability / bug fixes
|
||||
- Peek: UI improvements
|
||||
|
||||
## PowerToys Community
|
||||
|
||||
The PowerToys team is extremely grateful to have the [support of an amazing active community][community-link]. The work you do is incredibly important. PowerToys wouldn’t be nearly what it is today without your help filing bugs, updating documentation, guiding the design, or writing features. We want to say thank you and take time to recognize your work. Month over month, you directly help make PowerToys a better piece of software.
|
||||
The PowerToys team is extremely grateful to have the [support of an amazing active community][community-link]. The work you do is incredibly important. PowerToys wouldn’t be nearly what it is today without your help filing bugs, updating documentation, guiding the design, or writing features. We want to say thank you and take time to recognize your work. Month by month, you directly help make PowerToys a better piece of software.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
|
@ -2,35 +2,36 @@
|
||||
|
||||
## Fork, Clone, Branch and Create your PR
|
||||
|
||||
Once you've discussed your proposed feature/fix/etc. with a team member, and you've agreed an approach or a spec has been written and approved, it's time to start development:
|
||||
Once you've discussed your proposed feature/fix/etc. with a team member, and an approach or a spec has been written and approved, it's time to start development:
|
||||
|
||||
1. Fork the repo if you haven't already
|
||||
1. Fork the repo on GitHub if you haven't already
|
||||
1. Clone your fork locally
|
||||
1. Create & push a feature branch
|
||||
1. Create a [Draft Pull Request (PR)](https://github.blog/2019-02-14-introducing-draft-pull-requests/)
|
||||
1. Create a feature branch
|
||||
1. Work on your changes
|
||||
1. Create a [Draft Pull Request (PR)](https://github.blog/2019-02-14-introducing-draft-pull-requests/)
|
||||
1. When ready, mark your PR as "ready for review".
|
||||
|
||||
## Rules
|
||||
|
||||
- **Follow the pattern of what you already see in the code.**
|
||||
- [Coding style](style.md).
|
||||
- Try to package new ideas/components into libraries that have nicely defined interfaces.
|
||||
- Package new ideas into classes or refactor existing ideas into a class as you extend.
|
||||
- When adding new classes/methods/changing existing code: add new unit tests or update the existing tests.
|
||||
- Try to package new functionality/components into libraries that have nicely defined interfaces.
|
||||
- Package new functionality into classes or refactor existing functionality into a class as you extend the code.
|
||||
- When adding new classes/methods/changing existing code, add new unit tests or update the existing tests.
|
||||
|
||||
## GitHub Workflow
|
||||
|
||||
- Before starting to work on a fix/feature, make sure there is an open issue to track the work.
|
||||
- Add the `In progress` label to the issue, if not already present also add a `Cost-Small/Medium/Large` estimate and make sure all appropriate labels are set.
|
||||
- If you are a community contributor, you will not be able to add labels to the issue, in that case just add a comment saying that you started to work on the issue and try to give an estimate for the delivery date.
|
||||
- Add the `In progress` label to the issue, if not already present. Also add a `Cost-Small/Medium/Large` estimate and make sure all appropriate labels are set.
|
||||
- If you are a community contributor, you will not be able to add labels to the issue; in that case just add a comment saying that you have started work on the issue and try to give an estimate for the delivery date.
|
||||
- If the work item has a medium/large cost, using the markdown task list, list each sub item and update the list with a check mark after completing each sub item.
|
||||
- When opening a PR, follow the PR template.
|
||||
- When you'd like the team to take a look, (even if the work is not yet fully-complete), mark the PR as 'Ready For Review' so that the team can review your work and provide comments, suggestions, and request changes. It may take several cycles, but the end result will be solid, testable, conformant code that is safe for us to merge.
|
||||
- When the PR is approved, let the owner of the PR merge it. For community contributions the reviewer that approved the PR can also merge it.
|
||||
- Use the `Squash and merge` option to merge a PR, if you don't want to squash it because there are logically different commits, use `Rebase and merge`.
|
||||
- When you'd like the team to take a look (even if the work is not yet fully complete) mark the PR as 'Ready For Review' so that the team can review your work and provide comments, suggestions, and request changes. It may take several cycles, but the end result will be solid, testable, conformant code that is safe for us to merge.
|
||||
- When the PR is approved, let the owner of the PR merge it. For community contributions, the reviewer who approved the PR can also merge it.
|
||||
- Use the `Squash and merge` option to merge a PR. If you don't want to squash it because there are logically different commits, use `Rebase and merge`.
|
||||
- We don't close issues automatically when referenced in a PR, so after the PR is merged:
|
||||
- mark the issue(s), that the PR solved, with the `Resolution-Fix-Committed` label, remove the `In progress` label and if the issue is assigned to a project, move the item to the `Done` status.
|
||||
- don't close the issue if it's a bug in the current released version since users tend to not search for closed issues, we will close the resolved issues when a new version is released.
|
||||
- mark the issue(s) that the PR solved with the `Resolution-Fix-Committed` label, remove the `In progress` label and if the issue is assigned to a project, move the item to the `Done` status.
|
||||
- don't close the issue if it's a bug in the current released version; since users tend to not search for closed issues, we will close the resolved issues when a new version is released.
|
||||
- if it's not a code fix that effects the end user, the issue can be closed (for example a fix in the build or a code refactoring and so on).
|
||||
|
||||
## Compiling PowerToys
|
||||
@ -39,12 +40,16 @@ Once you've discussed your proposed feature/fix/etc. with a team member, and you
|
||||
|
||||
1. Windows 10 April 2018 Update (version 1803) or newer
|
||||
1. Visual Studio Community/Professional/Enterprise 2022 17.4 or newer
|
||||
1. Git clone PowerToys repository
|
||||
1. A local clone of the PowerToys repository
|
||||
|
||||
### Install Visual Studio dependencies
|
||||
|
||||
1. Open the `PowerToys.sln` file.
|
||||
1. If you see a dialog that says `install extra components` in the solution explorer pane, click `install`
|
||||
|
||||
### Get Submodules to compile
|
||||
We have submodules that need to be initialized before you can compile most parts of PowerToys. This should be a one time step.
|
||||
|
||||
We have submodules that need to be initialized before you can compile most parts of PowerToys. This should be a one-time step.
|
||||
|
||||
1. Open a terminal
|
||||
1. Navigate to the folder you cloned PowerToys to.
|
||||
@ -52,9 +57,11 @@ We have submodules that need to be initialized before you can compile most parts
|
||||
|
||||
### Compiling Source Code
|
||||
|
||||
- Open `PowerToys.sln` in Visual Studio, in the `Solutions Configuration` drop-down menu select `Release` or `Debug`, from the `Build` menu choose `Build Solution`.
|
||||
- The PowerToys binaries will be in your repo under `x64\Release\`.
|
||||
- You can run `x64\Release\PowerToys.exe` directly without installing PowerToys, but some modules (i.e. PowerRename, ImageResizer, File Explorer extension etc.) will not be available unless you also build the installer and install PowerToys.
|
||||
- Open `PowerToys.sln` in Visual Studio.
|
||||
- In the `Solutions Configuration` drop-down menu select `Release` or `Debug`.
|
||||
- From the `Build` menu choose `Build Solution`, or press <kbd>Control</kbd>+<kbd>Shift</kbd>+<kbd>b</kbd> on your keyboard.
|
||||
- The build process may take several minutes depending on your computer's performance. Once it completes, the PowerToys binaries will be in your repo under `x64\Release\`.
|
||||
- You can run `x64\Release\PowerToys.exe` directly without installing PowerToys, but some modules (i.e. PowerRename, ImageResizer, File Explorer extension etc.) will not be available unless you also build the installer and install PowerToys.
|
||||
|
||||
## Compile the installer
|
||||
|
||||
@ -62,7 +69,7 @@ Our installer is two parts, an EXE and an MSI. The EXE (Bootstrapper) contains
|
||||
- The EXE installs all prerequisites and installs PowerToys via the MSI. It has additional features such as the installation flags (see below).
|
||||
- The MSI installs the PowerToys binaries.
|
||||
|
||||
The installer can only be compiled in `Release` mode, step 1 and 2 must be done before the MSI will be able to be compiled.
|
||||
The installer can only be compiled in `Release` mode; steps 1 and 2 must be performed before the MSI can be compiled.
|
||||
|
||||
1. Compile `PowerToys.sln`. Instructions are listed above.
|
||||
1. Compile `BugReportTool.sln` tool. Path from root: `tools\BugReportTool\BugReportTool.sln` (details listed below)
|
||||
@ -76,9 +83,11 @@ The installer can only be compiled in `Release` mode, step 1 and 2 must be done
|
||||
1. Install the [WiX Toolset build tools](https://wixtoolset.org/docs/v3/releases/v3-14-0-6526/). (installer [direct link](https://wixtoolset.org/downloads/v3.14.0.6526/wix314.exe))
|
||||
1. Download [WiX binaries](https://wixtoolset.org/downloads/v3.14.0.6526/wix314-binaries.zip) and extract `wix.targets` to `C:\Program Files (x86)\WiX Toolset v3.14`.
|
||||
|
||||
### Locally building the installer prerequisite projects all at once from the command-line
|
||||
### Building prerequisite projects
|
||||
|
||||
1. Open a `Developer Command Prompt for VS 2022`
|
||||
#### From the command line
|
||||
|
||||
1. From the start menu, open a `Developer Command Prompt for VS 2022`
|
||||
1. Ensure `nuget.exe` is in your `%path%`
|
||||
1. In the repo root, run these commands:
|
||||
|
||||
@ -93,20 +102,16 @@ nuget restore .\tools\StylesReportTool\StylesReportTool.sln
|
||||
msbuild -p:Platform=x64 -p:Configuration=Release .\tools\StylesReportTool\StylesReportTool.sln
|
||||
```
|
||||
|
||||
### Locally compiling the Bug reporting tool
|
||||
#### From Visual Studio
|
||||
|
||||
If you prefer, you can alternatively build prerequisite projects for the installer using the Visual Studio UI.
|
||||
|
||||
1. Open `tools\BugReportTool\BugReportTool.sln`
|
||||
1. In Visual Studio, in the `Solutions Configuration` drop-down menu select `Release`
|
||||
1. From the `Build` menu, choose `Build Solution`.
|
||||
|
||||
### Locally compiling the Webcam reporting tool
|
||||
|
||||
1. Open `tools\WebcamReportTool\WebcamReportTool.sln`
|
||||
1. In Visual Studio, in the `Solutions Configuration` drop-down menu select `Release`
|
||||
1. From the `Build` menu, choose `Build Solution`.
|
||||
|
||||
### Locally compiling the Window styles reporting tool
|
||||
|
||||
1. Open `tools\StylesReportTool\StylesReportTool.sln`
|
||||
1. In Visual Studio, in the `Solutions Configuration` drop-down menu select `Release`
|
||||
1. From the `Build` menu, choose `Build Solution`.
|
||||
@ -125,14 +130,14 @@ Head over to the wiki to see the [full list of supported installer arguments][in
|
||||
|
||||
## Debugging
|
||||
|
||||
The following configuration issue only applies if the user is a member of the Administrators group.
|
||||
To debug the PowerToys application in Visual Studio, set the `runner` project as your start-up project, then start the debugger.
|
||||
|
||||
Some PowerToys modules require being run with the highest permission level if the current user is a member of the Administrators group. The highest permission level is required to be able to perform some actions when an elevated application (e.g. Task Manager) is in the foreground or is the target of an action. Without elevated privileges some PowerToys modules will still work but with some limitations:
|
||||
Some PowerToys modules must be run with the highest permission level if the current user is a member of the Administrators group. The highest permission level is required to be able to perform some actions when an elevated application (e.g. Task Manager) is in the foreground or is the target of an action. Without elevated privileges some PowerToys modules will still work but with some limitations:
|
||||
|
||||
- The `FancyZones` module will be not be able to move an elevated window to a zone.
|
||||
- The `FancyZones` module will not be able to move an elevated window to a zone.
|
||||
- The `Shortcut Guide` module will not appear if the foreground window belongs to an elevated application.
|
||||
|
||||
To run and debug PowerToys from Visual Studio when the user is a member of the Administrators group, Visual Studio has to be started with elevated privileges. If you want to avoid running Visual Studio with elevated privileges and don't mind the limitations described above, you can do the following: open the `runner` project properties and navigate to the `Linker -> Manifest File` settings, edit the `UAC Execution Level` property and change it from `highestAvailable (level='highestAvailable')` to `asInvoker (/level='asInvoker')`, save the changes.
|
||||
Therefore, it is recommended to run Visual Studio with elevated privileges when debugging these scenarios. If you want to avoid running Visual Studio with elevated privileges and don't mind the limitations described above, you can do the following: open the `runner` project properties and navigate to the `Linker -> Manifest File` settings, edit the `UAC Execution Level` property and change it from `highestAvailable (level='highestAvailable')` to `asInvoker (/level='asInvoker').
|
||||
|
||||
## How to create new PowerToys
|
||||
|
||||
@ -155,7 +160,7 @@ It's responsible for:
|
||||
|
||||
### [`Interface`](modules/interface.md)
|
||||
|
||||
Definition of the interface used by the [`runner`](/src/runner) to manage the PowerToys. All PowerToys must implement this interface.
|
||||
The definition of the interface used by the [`runner`](/src/runner) to manage the PowerToys. All PowerToys must implement this interface.
|
||||
|
||||
### [`Common`](common.md)
|
||||
|
||||
@ -163,4 +168,4 @@ The common lib, as the name suggests, contains code shared by multiple PowerToys
|
||||
|
||||
### [`Settings`](settingsv2/)
|
||||
|
||||
Settings v2 is our current settings implementation. Please head over to the dev docs that goes into the current settings system.
|
||||
Settings v2 is our current settings implementation. Please head over to the dev docs that describe the current settings system.
|
||||
|
@ -162,7 +162,7 @@
|
||||
x:Uid="ColorFormatDialog"
|
||||
IsPrimaryButtonEnabled="{Binding IsValid, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
PrimaryButtonStyle="{ThemeResource AccentButtonStyle}"
|
||||
SecondaryButtonClick="ColorFormatDialog_CancelButtonClick">
|
||||
Closed="ColorFormatDialog_Closed">
|
||||
<ContentDialog.DataContext>
|
||||
<models:ColorFormatModel />
|
||||
</ContentDialog.DataContext>
|
||||
|
@ -112,7 +112,6 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
ColorFormatModel colorFormat = ColorFormatDialog.DataContext as ColorFormatModel;
|
||||
string oldName = ((KeyValuePair<string, string>)ColorFormatDialog.Tag).Key;
|
||||
ViewModel.UpdateColorFormat(oldName, colorFormat);
|
||||
ColorFormatDialog.Hide();
|
||||
}
|
||||
|
||||
private async void NewFormatClick(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
|
||||
@ -127,19 +126,6 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
await ColorFormatDialog.ShowAsync();
|
||||
}
|
||||
|
||||
private void ColorFormatDialog_CancelButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
||||
{
|
||||
if (ColorFormatDialog.Tag is KeyValuePair<string, string>)
|
||||
{
|
||||
ColorFormatModel modifiedColorFormat = ColorFormatDialog.DataContext as ColorFormatModel;
|
||||
KeyValuePair<string, string> oldProperties = (KeyValuePair<string, string>)ColorFormatDialog.Tag;
|
||||
modifiedColorFormat.Name = oldProperties.Key;
|
||||
modifiedColorFormat.Format = oldProperties.Value;
|
||||
}
|
||||
|
||||
ColorFormatDialog.Hide();
|
||||
}
|
||||
|
||||
private async void EditButton_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
SettingsCard btn = sender as SettingsCard;
|
||||
@ -162,5 +148,16 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
ViewModel.RefreshEnabledState();
|
||||
}
|
||||
|
||||
private void ColorFormatDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
|
||||
{
|
||||
if (args.Result != ContentDialogResult.Primary && ColorFormatDialog.Tag is KeyValuePair<string, string>)
|
||||
{
|
||||
ColorFormatModel modifiedColorFormat = ColorFormatDialog.DataContext as ColorFormatModel;
|
||||
KeyValuePair<string, string> oldProperties = (KeyValuePair<string, string>)ColorFormatDialog.Tag;
|
||||
modifiedColorFormat.Name = oldProperties.Key;
|
||||
modifiedColorFormat.Format = oldProperties.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -171,6 +171,8 @@
|
||||
IsExpanded="True">
|
||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.WindowSwitching}" />
|
||||
<controls:SettingsExpander.Items>
|
||||
<!-- HACK: For some weird reason, a Shortcut Control is not working correctly if it's the first item in the expander, so we add an invisible card as the first one. -->
|
||||
<controls:SettingsCard Visibility="Collapsed"/>
|
||||
<controls:SettingsCard x:Uid="FancyZones_HotkeyNextTabControl" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.WindowSwitchingCategoryEnabled}">
|
||||
<custom:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.NextTabHotkey, Mode=TwoWay}" />
|
||||
</controls:SettingsCard>
|
||||
|
@ -297,13 +297,16 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
|
||||
UpdateColorFormats();
|
||||
UpdateColorFormatPreview();
|
||||
ScheduleSavingOfSettings();
|
||||
}
|
||||
|
||||
private void ColorFormat_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
UpdateColorFormats();
|
||||
ScheduleSavingOfSettings();
|
||||
// Remaining properties are handled by the collection and by the dialog
|
||||
if (e.PropertyName == nameof(ColorFormatModel.IsShown))
|
||||
{
|
||||
UpdateColorFormats();
|
||||
ScheduleSavingOfSettings();
|
||||
}
|
||||
}
|
||||
|
||||
private void ScheduleSavingOfSettings()
|
||||
@ -434,6 +437,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
SelectedColorRepresentationValue = colorFormat.Name; // name might be changed by the user
|
||||
}
|
||||
|
||||
UpdateColorFormats();
|
||||
UpdateColorFormatPreview();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user