mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02:00
[FancyZones] draw active zones on top of inactive zones (#4727)
This commit is contained in:
@@ -163,6 +163,7 @@ namespace ZoneWindowDrawUtils
|
|||||||
isHighlighted[x] = true;
|
isHighlighted[x] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// First draw the inactive zones
|
||||||
for (auto iter = zones.begin(); iter != zones.end(); iter++)
|
for (auto iter = zones.begin(); iter != zones.end(); iter++)
|
||||||
{
|
{
|
||||||
int zoneId = static_cast<int>(iter - zones.begin());
|
int zoneId = static_cast<int>(iter - zones.begin());
|
||||||
@@ -188,7 +189,19 @@ namespace ZoneWindowDrawUtils
|
|||||||
DrawZone(hdc, colorViewer, zone, zones, flashMode);
|
DrawZone(hdc, colorViewer, zone, zones, flashMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
|
||||||
|
// Draw the active zones on top of the inactive zones
|
||||||
|
for (auto iter = zones.begin(); iter != zones.end(); iter++)
|
||||||
|
{
|
||||||
|
int zoneId = static_cast<int>(iter - zones.begin());
|
||||||
|
winrt::com_ptr<IZone> zone = iter->try_as<IZone>();
|
||||||
|
if (!zone)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isHighlighted[zoneId])
|
||||||
{
|
{
|
||||||
colorHighlight.fill = highlightColor;
|
colorHighlight.fill = highlightColor;
|
||||||
colorHighlight.border = zoneBorderColor;
|
colorHighlight.border = zoneBorderColor;
|
||||||
|
|||||||
Reference in New Issue
Block a user