Compare commits

...

6 Commits

Author SHA1 Message Date
Shawn Yuan
8755aacd0b allow partially succeeded build
Signed-off-by: Shawn Yuan <shuai.yuan.zju@gmail.com>
2025-04-24 15:58:26 +08:00
Shawn Yuan
e59ea36ccf update
Signed-off-by: Shawn Yuan <shuai.yuan.zju@gmail.com>
2025-04-24 15:17:19 +08:00
Shawn Yuan
2f40aab220 Merge branch 'shawn/testAz' of https://github.com/microsoft/PowerToys into shawn/testAz 2025-04-24 15:13:58 +08:00
Shawn Yuan
33459b718b update
Signed-off-by: Shawn Yuan <shuai.yuan.zju@gmail.com>
2025-04-24 15:13:35 +08:00
Shawn Yuan
7146da92ea Update ci-using-the-latest-winappsdk.yml for Azure Pipelines 2025-04-23 17:39:58 +08:00
PesBandi
bbe248ca90 [ColorPicker]Only close on escape if focused 2025-03-12 07:06:32 +01:00
4 changed files with 13 additions and 18 deletions

View File

@@ -33,7 +33,7 @@ parameters:
default: true default: true
- name: winAppSDKVersionNumber - name: winAppSDKVersionNumber
type: string type: string
default: 1.6 default: 1.7
- name: useExperimentalVersion - name: useExperimentalVersion
type: boolean type: boolean
default: false default: false
@@ -47,4 +47,4 @@ extends:
useVSPreview: ${{ parameters.useVSPreview }} useVSPreview: ${{ parameters.useVSPreview }}
useLatestWinAppSDK: ${{ parameters.useLatestWinAppSDK }} useLatestWinAppSDK: ${{ parameters.useLatestWinAppSDK }}
winAppSDKVersionNumber: ${{ parameters.winAppSDKVersionNumber }} winAppSDKVersionNumber: ${{ parameters.winAppSDKVersionNumber }}
useExperimentalVersion: ${{ parameters.useExperimentalVersion }} useExperimentalVersion: ${{ parameters.useExperimentalVersion }}

View File

@@ -27,6 +27,9 @@ steps:
buildType: 'specific' buildType: 'specific'
project: '55e8140e-57ac-4e5f-8f9c-c7c15b51929d' project: '55e8140e-57ac-4e5f-8f9c-c7c15b51929d'
definition: '104083' definition: '104083'
specificBuildWithTriggering: false
allowPartiallySucceededBuilds: true
allowFailedBuilds: true
buildVersionToDownload: 'latestFromBranch' buildVersionToDownload: 'latestFromBranch'
branchName: 'refs/heads/release/${{ parameters.versionNumber }}-stable' branchName: 'refs/heads/release/${{ parameters.versionNumber }}-stable'
artifactName: 'WindowsAppSDK_Nuget_And_MSIX' artifactName: 'WindowsAppSDK_Nuget_And_MSIX'

View File

@@ -230,7 +230,7 @@ namespace ColorPicker.Helpers
public bool HandleEnterPressed() public bool HandleEnterPressed()
{ {
if (!IsColorPickerVisible()) if (!_colorPickerShown)
{ {
return false; return false;
} }
@@ -241,14 +241,13 @@ namespace ColorPicker.Helpers
public bool HandleEscPressed() public bool HandleEscPressed()
{ {
if (!BlockEscapeKeyClosingColorPickerEditor) if (!BlockEscapeKeyClosingColorPickerEditor
&& (_colorPickerShown || (_colorEditorWindow != null && _colorEditorWindow.IsActive)))
{ {
return EndUserSession(); return EndUserSession();
} }
else
{ return false;
return false;
}
} }
internal void MoveCursor(int xOffset, int yOffset) internal void MoveCursor(int xOffset, int yOffset)

View File

@@ -70,17 +70,10 @@ namespace ColorPicker.Keyboard
var virtualCode = e.KeyboardData.VirtualCode; var virtualCode = e.KeyboardData.VirtualCode;
// ESC pressed // ESC pressed
if (virtualCode == KeyInterop.VirtualKeyFromKey(Key.Escape) if (virtualCode == KeyInterop.VirtualKeyFromKey(Key.Escape) && e.KeyboardState == GlobalKeyboardHook.KeyboardState.KeyDown)
&& e.KeyboardState == GlobalKeyboardHook.KeyboardState.KeyDown
)
{ {
if (_appStateHandler.IsColorPickerVisible() e.Handled = _appStateHandler.HandleEscPressed();
|| !AppStateHandler.BlockEscapeKeyClosingColorPickerEditor return;
)
{
e.Handled = _appStateHandler.EndUserSession();
return;
}
} }
if ((virtualCode == KeyInterop.VirtualKeyFromKey(Key.Space) || virtualCode == KeyInterop.VirtualKeyFromKey(Key.Enter)) && (e.KeyboardState == GlobalKeyboardHook.KeyboardState.KeyDown)) if ((virtualCode == KeyInterop.VirtualKeyFromKey(Key.Space) || virtualCode == KeyInterop.VirtualKeyFromKey(Key.Enter)) && (e.KeyboardState == GlobalKeyboardHook.KeyboardState.KeyDown))