mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[FancyZones] Configurable sensitivity radius (#6554)
* Add the setting for the Sensitivity Radius to JSON and the Editor Use the setting when determining Zones to highligh * Fix FanzyZones unit tests Add test for Json upgrade * Updated texts in FancyZone Editor More Text to Resources / Use Resources * Added constant for default of Sensitivity Radius * When installing from scratch of when a new device is added set the sensitivity radius to the default. Move all the constant values to a single namespace * restore correct formatting Co-authored-by: Remy Blok <remy.blok@prodware.nl>
This commit is contained in:
@@ -472,10 +472,13 @@ void ZoneWindow::CalculateZoneSet() noexcept
|
||||
GUID zoneSetId;
|
||||
if (SUCCEEDED_LOG(CLSIDFromString(activeZoneSet.uuid.c_str(), &zoneSetId)))
|
||||
{
|
||||
int sensitivityRadius = deviceInfoData->sensitivityRadius;
|
||||
|
||||
auto zoneSet = MakeZoneSet(ZoneSetConfig(
|
||||
zoneSetId,
|
||||
activeZoneSet.type,
|
||||
m_monitor));
|
||||
m_monitor,
|
||||
sensitivityRadius));
|
||||
|
||||
RECT workArea;
|
||||
if (m_monitor)
|
||||
@@ -499,6 +502,7 @@ void ZoneWindow::CalculateZoneSet() noexcept
|
||||
bool showSpacing = deviceInfoData->showSpacing;
|
||||
int spacing = showSpacing ? deviceInfoData->spacing : 0;
|
||||
int zoneCount = deviceInfoData->zoneCount;
|
||||
|
||||
zoneSet->CalculateZones(workArea, zoneCount, spacing);
|
||||
UpdateActiveZoneSet(zoneSet.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user