mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
prepare for merge
This commit is contained in:
@@ -85,7 +85,7 @@ This is a lighter release, with a shorter development cycle and focused on stabi
|
||||
- There are reports of users who are [unable to open the Settings window](https://github.com/microsoft/PowerToys/issues/18015). This is being caused by incompatibilities with some applications (RTSS RivaTuner Statistics Server and MSI AfterBurner are known examples of this). If you're affected by this, please check the linked issue to verify if any of the presented solutions works for you.
|
||||
|
||||
### General
|
||||
- Upgraded the Windows App SDK runtimes to 1.1.2.
|
||||
- Upgraded the Windows App SDK runtimes to 1.1.4.
|
||||
- The new Windows 11 context menu entries are now correctly added to Windows 11 dev channel insider builds. (This was a hotfix for 0.60)
|
||||
- The old context menu entries are shown alongside the new Windows 11 context menu entries to be compatible with software that overrides the Windows 11 context menu behavior. (This was a hotfix for 0.60)
|
||||
- Consolidated C# language version across the solution. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||
|
||||
@@ -47,7 +47,7 @@ D2DState::D2DState(HWND overlayWindow, std::vector<D2D1::ColorF> solidBrushesCol
|
||||
DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL,
|
||||
DWRITE_FONT_STRETCH_NORMAL,
|
||||
konst::FONT_SIZE * dpiScale,
|
||||
consts::FONT_SIZE * dpiScale,
|
||||
L"en-US",
|
||||
&textFormat));
|
||||
winrt::check_hresult(textFormat->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_CENTER));
|
||||
@@ -87,7 +87,7 @@ void D2DState::DrawTextBox(const wchar_t* text, uint32_t textLen, const float co
|
||||
.bottom = cornerY + TEXT_BOX_HEIGHT / 2.f + TEXT_BOX_OFFSET_Y };
|
||||
|
||||
D2D1_ROUNDED_RECT textBoxRect;
|
||||
textBoxRect.radiusX = textBoxRect.radiusY = konst::TEXT_BOX_CORNER_RADIUS * dpiScale;
|
||||
textBoxRect.radiusX = textBoxRect.radiusY = consts::TEXT_BOX_CORNER_RADIUS * dpiScale;
|
||||
textBoxRect.rect.bottom = textRect.bottom - TEXT_BOX_PADDING;
|
||||
textBoxRect.rect.top = textRect.top + TEXT_BOX_PADDING;
|
||||
textBoxRect.rect.left = textRect.left - TEXT_BOX_PADDING;
|
||||
|
||||
@@ -12,16 +12,16 @@ namespace
|
||||
// TODO: investigate why we need 1.f offset.
|
||||
if (horizontal)
|
||||
{
|
||||
start.x -= konst::FEET_HALF_LENGTH + 1.f;
|
||||
end.x += konst::FEET_HALF_LENGTH;
|
||||
start.x -= consts::FEET_HALF_LENGTH + 1.f;
|
||||
end.x += consts::FEET_HALF_LENGTH;
|
||||
|
||||
start.y += 1.f;
|
||||
end.y += 1.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
start.y -= konst::FEET_HALF_LENGTH + 1.f;
|
||||
end.y += konst::FEET_HALF_LENGTH;
|
||||
start.y -= consts::FEET_HALF_LENGTH + 1.f;
|
||||
end.y += consts::FEET_HALF_LENGTH;
|
||||
|
||||
start.x += 1.f;
|
||||
end.x += 1.f;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace winrt::PowerToys::MeasureToolCore::implementation
|
||||
POINT cursorPos = {};
|
||||
GetCursorPos(&cursorPos);
|
||||
InterlockedExchange64(reinterpret_cast<LONG64*>(&_commonState.cursorPos), std::bit_cast<LONG64>(cursorPos));
|
||||
std::this_thread::sleep_for(konst::TARGET_FRAME_DURATION);
|
||||
std::this_thread::sleep_for(consts::TARGET_FRAME_DURATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.2\build\native\Microsoft.WindowsAppSDK.props" Condition="Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.2\build\native\Microsoft.WindowsAppSDK.props')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.4\build\native\Microsoft.WindowsAppSDK.props" Condition="Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.4\build\native\Microsoft.WindowsAppSDK.props')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22000.197\build\Microsoft.Windows.SDK.BuildTools.props" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22000.197\build\Microsoft.Windows.SDK.BuildTools.props')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||
<PropertyGroup Label="Globals">
|
||||
@@ -125,7 +125,7 @@
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22000.197\build\Microsoft.Windows.SDK.BuildTools.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22000.197\build\Microsoft.Windows.SDK.BuildTools.targets')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.2\build\native\Microsoft.WindowsAppSDK.targets" Condition="Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.2\build\native\Microsoft.WindowsAppSDK.targets')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.4\build\native\Microsoft.WindowsAppSDK.targets" Condition="Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.4\build\native\Microsoft.WindowsAppSDK.targets')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
@@ -136,8 +136,8 @@
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220418.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22000.197\build\Microsoft.Windows.SDK.BuildTools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22000.197\build\Microsoft.Windows.SDK.BuildTools.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22000.197\build\Microsoft.Windows.SDK.BuildTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22000.197\build\Microsoft.Windows.SDK.BuildTools.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.2\build\native\Microsoft.WindowsAppSDK.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.2\build\native\Microsoft.WindowsAppSDK.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.2\build\native\Microsoft.WindowsAppSDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.2\build\native\Microsoft.WindowsAppSDK.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.4\build\native\Microsoft.WindowsAppSDK.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.4\build\native\Microsoft.WindowsAppSDK.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.4\build\native\Microsoft.WindowsAppSDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.1.4\build\native\Microsoft.WindowsAppSDK.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -350,8 +350,6 @@ void StartCapturingThread(const CommonState& commonState,
|
||||
|
||||
auto captureState = D3DCaptureState::Create(item, winrt::DirectXPixelFormat::B8G8R8A8UIntNormalized);
|
||||
|
||||
bool stopCapturing = false;
|
||||
|
||||
uint8_t pixelTolerance = 1;
|
||||
bool continuousCapture = false;
|
||||
state.Access([&](MeasureToolState& state) {
|
||||
@@ -367,7 +365,7 @@ void StartCapturingThread(const CommonState& commonState,
|
||||
|
||||
while (IsWindow(targetWindow))
|
||||
{
|
||||
std::this_thread::sleep_for(konst::TARGET_FRAME_DURATION);
|
||||
std::this_thread::sleep_for(consts::TARGET_FRAME_DURATION);
|
||||
}
|
||||
captureState->StopCapture();
|
||||
}
|
||||
@@ -380,9 +378,9 @@ void StartCapturingThread(const CommonState& commonState,
|
||||
UpdateCaptureState(commonState, state, targetWindow, pixelTolerance, textureView, continuousCapture);
|
||||
|
||||
const auto frameTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - now);
|
||||
if (frameTime < konst::TARGET_FRAME_DURATION)
|
||||
if (frameTime < consts::TARGET_FRAME_DURATION)
|
||||
{
|
||||
std::this_thread::sleep_for(konst::TARGET_FRAME_DURATION - frameTime);
|
||||
std::this_thread::sleep_for(consts::TARGET_FRAME_DURATION - frameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ struct CommonState
|
||||
struct BoundsToolState
|
||||
{
|
||||
std::optional<D2D_POINT_2F> currentRegionStart;
|
||||
CommonState* commonState = nullptr; // backreference for WndProc
|
||||
CommonState* commonState = nullptr; // required for WndProc
|
||||
};
|
||||
|
||||
struct MeasureToolState
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <chrono>
|
||||
|
||||
namespace konst
|
||||
namespace consts
|
||||
{
|
||||
constexpr inline size_t TARGET_FRAME_RATE = 120;
|
||||
constexpr inline auto TARGET_FRAME_DURATION = std::chrono::milliseconds{ 1000 } / TARGET_FRAME_RATE;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="1.6.4" />
|
||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.2" />
|
||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.4" />
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.194" />
|
||||
<PackageReference Include="WinUIEx" Version="1.6.0" />
|
||||
<Manifest Include="$(ApplicationManifest)" />
|
||||
|
||||
Reference in New Issue
Block a user