increase default pixel tolerance from 5 to 30

This commit is contained in:
yuyoyuppe
2022-08-24 20:39:03 +02:00
parent efe712f969
commit c3da4a923a
5 changed files with 5 additions and 5 deletions

View File

@@ -74,7 +74,7 @@ LRESULT CALLBACK MeasureToolWndProc(HWND window, UINT message, WPARAM wparam, LP
case WM_MOUSEWHEEL:
if (auto state = GetWindowParam<Serialized<MeasureToolState>*>(window))
{
const int8_t step = static_cast<short>(HIWORD(wparam)) < 0 ? -15 : 15;
const int8_t step = static_cast<short>(HIWORD(wparam)) < 0 ? -consts::MOUSE_WHEEL_TOLERANCE_STEP : consts::MOUSE_WHEEL_TOLERANCE_STEP;
state->Access([step](MeasureToolState& s) {
int wideVal = s.pixelTolerance;
wideVal += step;

View File

@@ -5,7 +5,7 @@
struct Settings
{
uint8_t pixelTolerance = 5;
uint8_t pixelTolerance = 30;
bool continuousCapture = false;
bool drawFeetOnCross = true;
bool perColorChannelEdgeDetection = false;

View File

@@ -47,7 +47,7 @@ struct MeasureToolState
Vertical,
Cross
};
uint8_t pixelTolerance = 5;
uint8_t pixelTolerance = 30;
bool continuousCapture = false;
bool drawFeetOnCross = true;
RECT measuredEdges = {};

View File

@@ -15,7 +15,7 @@ namespace consts
constexpr inline float SHADOW_RADIUS = 6.f;
constexpr inline float SHADOW_OFFSET = 5.f;
constexpr inline float CROSS_OPACITY = .25f;
constexpr inline int8_t MOUSE_WHEEL_TOLERANCE_STEP = 15;
/* Offset to not try not to use the cursor immediate pixels in measuring, but it seems only necessary for continuous mode. */
constexpr inline long CURSOR_OFFSET_AMOUNT_X = 4;
constexpr inline long CURSOR_OFFSET_AMOUNT_Y = 4;

View File

@@ -14,7 +14,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
public MeasureToolProperties()
{
ActivationShortcut = new HotkeySettings(true, false, false, true, 0x4D);
PixelTolerance = new IntProperty(5);
PixelTolerance = new IntProperty(30);
ContinuousCapture = false;
DrawFeetOnCross = true;
PerColorChannelEdgeDetection = false;