mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[FancyZones] Fix canvas layout with scaling reset issue (#17186)
* canvas scaling * predef layout check * return false on custom layout error * clean up * update unit tests * spelling * floating point convert * fix build
This commit is contained in:
23
src/modules/fancyzones/FancyZonesLib/LayoutConfigurator.h
Normal file
23
src/modules/fancyzones/FancyZonesLib/LayoutConfigurator.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <FancyZonesLib/Zone.h>
|
||||
#include <FancyZonesLib/util.h>
|
||||
|
||||
// Mapping zone id to zone
|
||||
using ZonesMap = std::map<ZoneIndex, winrt::com_ptr<IZone>>;
|
||||
|
||||
namespace FancyZonesDataTypes
|
||||
{
|
||||
struct CustomLayoutData;
|
||||
}
|
||||
|
||||
class LayoutConfigurator
|
||||
{
|
||||
public:
|
||||
static ZonesMap Focus(FancyZonesUtils::Rect workArea, int zoneCount) noexcept;
|
||||
static ZonesMap Rows(FancyZonesUtils::Rect workArea, int zoneCount, int spacing) noexcept;
|
||||
static ZonesMap Columns(FancyZonesUtils::Rect workArea, int zoneCount, int spacing) noexcept;
|
||||
static ZonesMap Grid(FancyZonesUtils::Rect workArea, int zoneCount, int spacing) noexcept;
|
||||
static ZonesMap PriorityGrid(FancyZonesUtils::Rect workArea, int zoneCount, int spacing) noexcept;
|
||||
static ZonesMap Custom(FancyZonesUtils::Rect workArea, HMONITOR monitor, const FancyZonesDataTypes::CustomLayoutData& data, int spacing) noexcept;
|
||||
};
|
||||
Reference in New Issue
Block a user