From 675d79a4aa19b1a6b5934ac9399a6b5ef137d840 Mon Sep 17 00:00:00 2001 From: Andrey Nekrasov Date: Fri, 9 Sep 2022 21:25:05 +0300 Subject: [PATCH] [Screen Ruler] Improve UX (#20400) * [Screen Ruler] add 7% opacity to tooltip background * [Screen Ruler] restrict mouse cursor to monitor while in bounds mode * [Screen Ruler] Do not preview overlay ui on all virtual desktops (Win + tab) * [Screen Ruler] add hotkeys for toolbar #20345 * [Screen Ruler] Make single snapshot capture mode a default and update warning * [Screen Ruler] Fix touch input in bounds mode #20286 * [Screen Ruler] activate window and set HWND_TOPMOST flag again after initialization --- .github/actions/spell-check/expect.txt | 8 + .../MeasureToolCore/BoundsToolOverlayUI.cpp | 218 ++++++++++++++---- .../MeasureTool/MeasureToolCore/D2DState.cpp | 15 +- .../MeasureTool/MeasureToolCore/D2DState.h | 3 +- .../MeasureToolCore/MeasureToolOverlayUI.cpp | 5 +- .../MeasureTool/MeasureToolCore/OverlayUI.cpp | 15 +- .../MeasureTool/MeasureToolCore/Settings.h | 2 +- .../MeasureTool/MeasureToolCore/ToolState.h | 13 +- .../MeasureTool/MeasureToolUI/MainWindow.xaml | 22 +- .../MeasureToolUI/MainWindow.xaml.cs | 23 ++ .../MeasureToolProperties.cs | 2 +- .../Settings.UI/Strings/en-us/Resources.resw | 2 +- 12 files changed, 256 insertions(+), 72 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 53748f0206..f39b8f4c2e 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -644,6 +644,7 @@ FRAMECHANGED franky frankychen Froml +FROMTOUCH fstream FTYPE func @@ -784,6 +785,7 @@ hsv htcfreek HTCLIENT HTHUMBNAIL +HTOUCHINPUT HTTRANSPARENT HValue Hvci @@ -869,6 +871,7 @@ IImage Iindex IInitialize IInspectable +IInvoke IIO IItem IJson @@ -1276,6 +1279,7 @@ monitorinfof Monthand Moq MOUSEACTIVATE +MOUSEEVENTF MOUSEHWHEEL MOUSEINPUT MOUSELEAVE @@ -2089,6 +2093,8 @@ Toolset toolwindow TOPDOWNDIB toplevel +TOUCHEVENTF +TOUCHINPUT touchpad toupper Towindow @@ -2108,6 +2114,7 @@ Tshuapa TStr Tuva TValue +TWF TYMED typedef TYPEKEY @@ -2262,6 +2269,7 @@ VSTT vswhere vtable Vtbl +WANTPALM wbem wbemuuid WBounds diff --git a/src/modules/MeasureTool/MeasureToolCore/BoundsToolOverlayUI.cpp b/src/modules/MeasureTool/MeasureToolCore/BoundsToolOverlayUI.cpp index b5f21f4074..a0898a701e 100644 --- a/src/modules/MeasureTool/MeasureToolCore/BoundsToolOverlayUI.cpp +++ b/src/modules/MeasureTool/MeasureToolCore/BoundsToolOverlayUI.cpp @@ -5,6 +5,72 @@ #include +#define MOUSEEVENTF_FROMTOUCH 0xFF515700 + +namespace +{ + void ToggleCursor(const bool show) + { + if (show) + { + for (; ShowCursor(show) < 0;) + ; + } + else + { + for (; ShowCursor(show) >= 0;) + ; + } + } + + void HandleCursorMove(HWND window, BoundsToolState* toolState, const POINT cursorPos, const DWORD touchID = 0) + { + if (!toolState->perScreen[window].currentBounds || (toolState->perScreen[window].currentBounds->touchID != touchID)) + return; + + toolState->perScreen[window].currentBounds->currentPos = + D2D_POINT_2F{ .x = static_cast(cursorPos.x), .y = static_cast(cursorPos.y) }; + } + + void HandleCursorDown(HWND window, BoundsToolState* toolState, const POINT cursorPos, const DWORD touchID = 0) + { + ToggleCursor(false); + + RECT windowRect; + if (GetWindowRect(window, &windowRect)) + ClipCursor(&windowRect); + + const D2D_POINT_2F newBoundsStart = { .x = static_cast(cursorPos.x), .y = static_cast(cursorPos.y) }; + toolState->perScreen[window].currentBounds = CursorDrag{ + .startPos = newBoundsStart, + .currentPos = newBoundsStart, + .touchID = touchID + }; + } + + void HandleCursorUp(HWND window, BoundsToolState* toolState, const POINT cursorPos) + { + ToggleCursor(true); + ClipCursor(nullptr); + + toolState->commonState->overlayBoxText.Read([](const OverlayBoxText& text) { + SetClipBoardToText(text.buffer); + }); + + if (const bool shiftPress = GetKeyState(VK_SHIFT) & 0x8000; shiftPress && toolState->perScreen[window].currentBounds) + { + D2D1_RECT_F rect; + std::tie(rect.left, rect.right) = + std::minmax(static_cast(cursorPos.x), toolState->perScreen[window].currentBounds->startPos.x); + std::tie(rect.top, rect.bottom) = + std::minmax(static_cast(cursorPos.y), toolState->perScreen[window].currentBounds->startPos.y); + toolState->perScreen[window].measurements.push_back(Measurement{ rect }); + } + + toolState->perScreen[window].currentBounds = std::nullopt; + } +} + LRESULT CALLBACK BoundsToolWndProc(HWND window, UINT message, WPARAM wparam, LPARAM lparam) noexcept { switch (message) @@ -25,64 +91,122 @@ LRESULT CALLBACK BoundsToolWndProc(HWND window, UINT message, WPARAM wparam, LPA break; case WM_LBUTTONDOWN: { - for (; ShowCursor(false) >= 0;) - ; + const bool touchEvent = (GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH; + if (touchEvent) + break; + auto toolState = GetWindowParam(window); if (!toolState) break; - const POINT cursorPos = convert::FromSystemToWindow(window, toolState->commonState->cursorPosSystemSpace); - D2D_POINT_2F newRegionStart = { .x = static_cast(cursorPos.x), .y = static_cast(cursorPos.y) }; - toolState->perScreen[window].currentRegionStart = newRegionStart; + HandleCursorDown(window, + toolState, + convert::FromSystemToWindow(window, toolState->commonState->cursorPosSystemSpace)); break; } case WM_CURSOR_LEFT_MONITOR: { - for (; ShowCursor(true) < 0;) - ; + ToggleCursor(true); + + ClipCursor(nullptr); auto toolState = GetWindowParam(window); if (!toolState) break; - toolState->perScreen[window].currentRegionStart = std::nullopt; + toolState->perScreen[window].currentBounds = std::nullopt; break; } - case WM_LBUTTONUP: + case WM_TOUCH: { - for (; ShowCursor(true) < 0;) - ; - auto toolState = GetWindowParam(window); - if (!toolState || !toolState->perScreen[window].currentRegionStart) + if (!toolState) break; + std::array inputs; + const size_t nInputs = std::min(static_cast(LOWORD(wparam)), inputs.size()); + const auto inputHandle = std::bit_cast(lparam); + GetTouchInputInfo(inputHandle, static_cast(nInputs), inputs.data(), sizeof(TOUCHINPUT)); - toolState->commonState->overlayBoxText.Read([](const OverlayBoxText& text) { - SetClipBoardToText(text.buffer); - }); - - if (const bool shiftPress = GetKeyState(VK_SHIFT) & 0x8000; shiftPress) + for (UINT i = 0; i < nInputs; ++i) { - const auto cursorPos = convert::FromSystemToWindow(window, toolState->commonState->cursorPosSystemSpace); + const auto& input = inputs[i]; - D2D1_RECT_F rect; - std::tie(rect.left, rect.right) = std::minmax(static_cast(cursorPos.x), toolState->perScreen[window].currentRegionStart->x); - std::tie(rect.top, rect.bottom) = std::minmax(static_cast(cursorPos.y), toolState->perScreen[window].currentRegionStart->y); - toolState->perScreen[window].measurements.push_back(Measurement{ rect }); + if (const bool down = (input.dwFlags & TOUCHEVENTF_DOWN) && (input.dwFlags & TOUCHEVENTF_PRIMARY); down) + { + HandleCursorDown( + window, + toolState, + POINT{ TOUCH_COORD_TO_PIXEL(input.x), TOUCH_COORD_TO_PIXEL(input.y) }, + input.dwID); + continue; + } + + if (const bool up = input.dwFlags & TOUCHEVENTF_UP; up) + { + HandleCursorUp( + window, + toolState, + POINT{ TOUCH_COORD_TO_PIXEL(input.x), TOUCH_COORD_TO_PIXEL(input.y) }); + continue; + } + + if (const bool move = input.dwFlags & TOUCHEVENTF_MOVE; move) + { + HandleCursorMove(window, + toolState, + POINT{ TOUCH_COORD_TO_PIXEL(input.x), TOUCH_COORD_TO_PIXEL(input.y) }, + input.dwID); + continue; + } } - toolState->perScreen[window].currentRegionStart = std::nullopt; + CloseTouchInputHandle(inputHandle); + break; + } + + case WM_MOUSEMOVE: + { + const bool touchEvent = (GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH; + if (touchEvent) + break; + + auto toolState = GetWindowParam(window); + if (!toolState) + break; + + HandleCursorMove(window, + toolState, + convert::FromSystemToWindow(window, toolState->commonState->cursorPosSystemSpace)); + break; + } + + case WM_LBUTTONUP: + { + const bool touchEvent = (GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH; + if (touchEvent) + break; + + auto toolState = GetWindowParam(window); + if (!toolState) + break; + + HandleCursorUp(window, + toolState, + convert::FromSystemToWindow(window, toolState->commonState->cursorPosSystemSpace)); break; } case WM_RBUTTONUP: { - for (; ShowCursor(true) < 0;) - ; + const bool touchEvent = (GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH; + if (touchEvent) + break; + + ToggleCursor(true); auto toolState = GetWindowParam(window); if (!toolState) break; - if (toolState->perScreen[window].currentRegionStart) - toolState->perScreen[window].currentRegionStart = std::nullopt; + if (toolState->perScreen[window].currentBounds) + toolState->perScreen[window].currentBounds = std::nullopt; else { if (toolState->perScreen[window].measurements.empty()) @@ -100,14 +224,12 @@ LRESULT CALLBACK BoundsToolWndProc(HWND window, UINT message, WPARAM wparam, LPA namespace { void DrawMeasurement(const Measurement& measurement, - const bool alignTextBoxToCenter, const CommonState& commonState, HWND window, const D2DState& d2dState, - float mouseX, - float mouseY) + std::optional textBoxCenter) { - const bool screenQuadrantAware = !alignTextBoxToCenter; + const bool screenQuadrantAware = textBoxCenter.has_value(); d2dState.ToggleAliasedLinesMode(true); d2dState.dxgiWindowState.rt->DrawRectangle(measurement.rect, d2dState.solidBrushes[Brush::line].get()); d2dState.ToggleAliasedLinesMode(false); @@ -124,17 +246,19 @@ namespace v = text; }); - if (alignTextBoxToCenter) + D2D_POINT_2F textBoxPos; + if (textBoxCenter) + textBoxPos = *textBoxCenter; + else { - mouseX = measurement.rect.left + measurement.Width(Measurement::Unit::Pixel) / 2; - mouseY = measurement.rect.top + measurement.Height(Measurement::Unit::Pixel) / 2; + textBoxPos.x = measurement.rect.left + measurement.Width(Measurement::Unit::Pixel) / 2; + textBoxPos.y = measurement.rect.top + measurement.Height(Measurement::Unit::Pixel) / 2; } d2dState.DrawTextBox(text.buffer.data(), measureStringBufLen, crossSymbolPos, - mouseX, - mouseY, + textBoxPos, screenQuadrantAware, window); } @@ -153,17 +277,13 @@ void DrawBoundsToolTick(const CommonState& commonState, const auto& perScreen = it->second; for (const auto& measure : perScreen.measurements) - DrawMeasurement(measure, true, commonState, window, d2dState, measure.rect.right, measure.rect.bottom); + DrawMeasurement(measure, commonState, window, d2dState, {}); - if (!perScreen.currentRegionStart.has_value()) - return; - - const auto cursorPos = convert::FromSystemToWindow(window, commonState.cursorPosSystemSpace); - - D2D1_RECT_F rect; - const float cursorX = static_cast(cursorPos.x); - const float cursorY = static_cast(cursorPos.y); - std::tie(rect.left, rect.right) = std::minmax(cursorX, perScreen.currentRegionStart->x); - std::tie(rect.top, rect.bottom) = std::minmax(cursorY, perScreen.currentRegionStart->y); - DrawMeasurement(Measurement{ rect }, false, commonState, window, d2dState, cursorX, cursorY); + if (perScreen.currentBounds.has_value()) + { + D2D1_RECT_F rect; + std::tie(rect.left, rect.right) = std::minmax(perScreen.currentBounds->startPos.x, perScreen.currentBounds->currentPos.x); + std::tie(rect.top, rect.bottom) = std::minmax(perScreen.currentBounds->startPos.y, perScreen.currentBounds->currentPos.y); + DrawMeasurement(Measurement{ rect }, commonState, window, d2dState, perScreen.currentBounds->currentPos); + } } diff --git a/src/modules/MeasureTool/MeasureToolCore/D2DState.cpp b/src/modules/MeasureTool/MeasureToolCore/D2DState.cpp index 62ffc43020..0d26dcb0ce 100644 --- a/src/modules/MeasureTool/MeasureToolCore/D2DState.cpp +++ b/src/modules/MeasureTool/MeasureToolCore/D2DState.cpp @@ -66,8 +66,7 @@ D2DState::D2DState(const DxgiAPI* dxgi, void D2DState::DrawTextBox(const wchar_t* text, const size_t textLen, const std::optional halfOpaqueSymbolPos, - const float centerX, - const float centerY, + const D2D_POINT_2F center, const bool screenQuadrantAware, const HWND window) const { @@ -88,10 +87,10 @@ void D2DState::DrawTextBox(const wchar_t* text, winrt::check_hresult(textLayout->SetMaxWidth(textMetrics.width)); winrt::check_hresult(textLayout->SetMaxHeight(textMetrics.height)); - D2D1_RECT_F textRect{ .left = centerX - textMetrics.width / 2.f, - .top = centerY - textMetrics.height / 2.f, - .right = centerX + textMetrics.width / 2.f, - .bottom = centerY + textMetrics.height / 2.f }; + D2D1_RECT_F textRect{ .left = center.x - textMetrics.width / 2.f, + .top = center.y - textMetrics.height / 2.f, + .right = center.x + textMetrics.width / 2.f, + .bottom = center.y + textMetrics.height / 2.f }; const float SHADOW_OFFSET = consts::SHADOW_OFFSET * dpiScale; if (screenQuadrantAware) @@ -99,8 +98,8 @@ void D2DState::DrawTextBox(const wchar_t* text, bool cursorInLeftScreenHalf = false; bool cursorInTopScreenHalf = false; DetermineScreenQuadrant(window, - static_cast(centerX), - static_cast(centerY), + static_cast(center.x), + static_cast(center.y), cursorInLeftScreenHalf, cursorInTopScreenHalf); float textQuadrantOffsetX = textMetrics.width / 2.f + SHADOW_OFFSET; diff --git a/src/modules/MeasureTool/MeasureToolCore/D2DState.h b/src/modules/MeasureTool/MeasureToolCore/D2DState.h index 18bad4536a..3d56c37351 100644 --- a/src/modules/MeasureTool/MeasureToolCore/D2DState.h +++ b/src/modules/MeasureTool/MeasureToolCore/D2DState.h @@ -36,8 +36,7 @@ struct D2DState void DrawTextBox(const wchar_t* text, const size_t textLen, const std::optional halfOpaqueSymbolPos, - const float centerX, - const float centerY, + const D2D_POINT_2F center, const bool screenQuadrantAware, const HWND window) const; void ToggleAliasedLinesMode(const bool enabled) const; diff --git a/src/modules/MeasureTool/MeasureToolCore/MeasureToolOverlayUI.cpp b/src/modules/MeasureTool/MeasureToolCore/MeasureToolOverlayUI.cpp index 6c276a0ada..983e02e88b 100644 --- a/src/modules/MeasureTool/MeasureToolCore/MeasureToolOverlayUI.cpp +++ b/src/modules/MeasureTool/MeasureToolCore/MeasureToolOverlayUI.cpp @@ -158,7 +158,7 @@ void DrawMeasureToolTick(const CommonState& commonState, } } }); - + if (!gotMeasurement) return; @@ -257,8 +257,7 @@ void DrawMeasureToolTick(const CommonState& commonState, d2dState.DrawTextBox(text.buffer.data(), measureStringBufLen, crossSymbolPos, - static_cast(cursorPos.x), - static_cast(cursorPos.y), + D2D_POINT_2F{ static_cast(cursorPos.x), static_cast(cursorPos.y) }, true, window); } diff --git a/src/modules/MeasureTool/MeasureToolCore/OverlayUI.cpp b/src/modules/MeasureTool/MeasureToolCore/OverlayUI.cpp index ac307ed836..f3571afc25 100644 --- a/src/modules/MeasureTool/MeasureToolCore/OverlayUI.cpp +++ b/src/modules/MeasureTool/MeasureToolCore/OverlayUI.cpp @@ -60,6 +60,15 @@ HWND CreateOverlayUIWindow(const CommonState& commonState, extraParam) }; winrt::check_bool(window); + + // Exclude overlay window from displaying in WIN+TAB preview, since WS_EX_TOOLWINDOW windows are displayed simultaneously on all virtual desktops. + // We can't remove WS_EX_TOOLWINDOW/WS_EX_NOACTIVATE flag, since we want to exclude the window from taskbar + BOOL val = TRUE; + DwmSetWindowAttribute(window, DWMWA_EXCLUDED_FROM_PEEK, &val, sizeof(val)); + + // We want to receive input events as soon as possible to prevent issues with touch input + RegisterTouchWindow(window, TWF_WANTPALM); + ShowWindow(window, SW_SHOWNORMAL); UpdateWindow(window); if (excludeFromCapture) @@ -100,13 +109,13 @@ HWND CreateOverlayUIWindow(const CommonState& commonState, std::vector AppendCommonOverlayUIColors(const D2D1::ColorF& lineColor) { D2D1::ColorF foreground = D2D1::ColorF::Black; - D2D1::ColorF background = D2D1::ColorF(0.96f, 0.96f, 0.96f, 1.0f); + D2D1::ColorF background = D2D1::ColorF(0.96f, 0.96f, 0.96f, .93f); D2D1::ColorF border = D2D1::ColorF(0.44f, 0.44f, 0.44f, 0.4f); if (WindowsColors::is_dark_mode()) { foreground = D2D1::ColorF::White; - background = D2D1::ColorF(0.17f, 0.17f, 0.17f, 1.0f); + background = D2D1::ColorF(0.17f, 0.17f, 0.17f, .93f); border = D2D1::ColorF(0.44f, 0.44f, 0.44f, 0.4f); } @@ -115,7 +124,7 @@ std::vector AppendCommonOverlayUIColors(const D2D1::ColorF& lineCo void OverlayUIState::RunUILoop() { - bool cursorOnScreen = true; + bool cursorOnScreen = false; while (IsWindow(_window) && !_commonState.closeOnOtherMonitors) { diff --git a/src/modules/MeasureTool/MeasureToolCore/Settings.h b/src/modules/MeasureTool/MeasureToolCore/Settings.h index 76f3af7ea2..44406fc3a0 100644 --- a/src/modules/MeasureTool/MeasureToolCore/Settings.h +++ b/src/modules/MeasureTool/MeasureToolCore/Settings.h @@ -8,7 +8,7 @@ struct Settings { uint8_t pixelTolerance = 30; - bool continuousCapture = true; + bool continuousCapture = false; bool drawFeetOnCross = true; bool perColorChannelEdgeDetection = false; std::array lineColor = {255, 69, 0}; diff --git a/src/modules/MeasureTool/MeasureToolCore/ToolState.h b/src/modules/MeasureTool/MeasureToolCore/ToolState.h index b4e14a322b..cc951a0ef1 100644 --- a/src/modules/MeasureTool/MeasureToolCore/ToolState.h +++ b/src/modules/MeasureTool/MeasureToolCore/ToolState.h @@ -36,13 +36,22 @@ struct CommonState std::atomic_bool closeOnOtherMonitors = false; }; +struct CursorDrag +{ + D2D_POINT_2F startPos = {}; + D2D_POINT_2F currentPos = {}; + DWORD touchID = 0; // indicate whether the drag belongs to a touch input sequence +}; + struct BoundsToolState { struct PerScreen { - std::optional currentRegionStart; + std::optional currentBounds; std::vector measurements; }; + + // TODO: refactor so we don't need unordered_map std::unordered_map perScreen; CommonState* commonState = nullptr; // required for WndProc @@ -60,7 +69,7 @@ struct MeasureToolState struct Global { uint8_t pixelTolerance = 30; - bool continuousCapture = true; + bool continuousCapture = false; bool drawFeetOnCross = true; bool perColorChannelEdgeDetection = false; Mode mode = Mode::Cross; diff --git a/src/modules/MeasureTool/MeasureToolUI/MainWindow.xaml b/src/modules/MeasureTool/MeasureToolUI/MainWindow.xaml index e1c9e35ff1..c03156efce 100644 --- a/src/modules/MeasureTool/MeasureToolUI/MainWindow.xaml +++ b/src/modules/MeasureTool/MeasureToolUI/MainWindow.xaml @@ -261,13 +261,21 @@ Click="BoundsTool_Click" Content="" Style="{StaticResource ToggleButtonRadioButtonStyle}" - ToolTipService.ToolTip="{x:Bind p:Resources.Bounds}" /> + KeyboardAcceleratorPlacementMode="Auto" + ToolTipService.ToolTip="{x:Bind p:Resources.Bounds}"> + + + + + + + + + + + + + diff --git a/src/modules/MeasureTool/MeasureToolUI/MainWindow.xaml.cs b/src/modules/MeasureTool/MeasureToolUI/MainWindow.xaml.cs index f08a614aa4..f90f7a55d2 100644 --- a/src/modules/MeasureTool/MeasureToolUI/MainWindow.xaml.cs +++ b/src/modules/MeasureTool/MeasureToolUI/MainWindow.xaml.cs @@ -6,8 +6,11 @@ using System; using Microsoft.UI; using Microsoft.UI.Windowing; using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Automation.Peers; +using Microsoft.UI.Xaml.Automation.Provider; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Input; using Windows.Graphics; using WinUIEx; @@ -64,6 +67,7 @@ namespace MeasureToolUI _initialPosition.X + (int)(dpiScale * WindowWidth), _initialPosition.Y + (int)(dpiScale * WindowHeight)); OnPositionChanged(_initialPosition); + SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); } private void MainWindow_Closed(object sender, WindowEventArgs args) @@ -149,5 +153,24 @@ namespace MeasureToolUI { _coreLogic?.Dispose(); } + + private void KeyboardAccelerator_Invoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args) + { + if (args.Element is ToggleButton toggle) + { + var peer = new ToggleButtonAutomationPeer(toggle); + peer.Toggle(); + args.Handled = true; + } + else if (args.Element is Button button) + { + var peer = new ButtonAutomationPeer(button); + if (peer.GetPattern(PatternInterface.Invoke) is IInvokeProvider provider) + { + provider.Invoke(); + args.Handled = true; + } + } + } } } diff --git a/src/settings-ui/Settings.UI.Library/MeasureToolProperties.cs b/src/settings-ui/Settings.UI.Library/MeasureToolProperties.cs index f83db3dfb5..3fc62a0880 100644 --- a/src/settings-ui/Settings.UI.Library/MeasureToolProperties.cs +++ b/src/settings-ui/Settings.UI.Library/MeasureToolProperties.cs @@ -16,7 +16,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library ActivationShortcut = new HotkeySettings(true, false, false, true, 0x4D); UnitsOfMeasure = new IntProperty(0); PixelTolerance = new IntProperty(30); - ContinuousCapture = true; + ContinuousCapture = false; DrawFeetOnCross = true; PerColorChannelEdgeDetection = false; MeasureCrossColor = new StringProperty("#FF4500"); diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw index 79b2fae5e1..2d48b09ee4 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -2396,7 +2396,7 @@ Activate by holding the key for the character you want to add an accent to, then Learn more about conflicting activation commands - The continuous capture mode will consume more resources when in use. + The continuous capture mode will consume more resources when in use. Also, measurements will be excluded from screenshots and screen capture. pointer as in mouse pointer. Resources refer to things like CPU, GPU, RAM