Shared resolution of gap-override layers expressed as PerScreenKeys-shaped QVariantMaps (context-rule gap overrides, per-screen config overrides). More...
Functions | |
| template<typename Normalize > | |
| std::optional< int > | gapFromOverrideMap (const QVariantMap &map, QLatin1String key, Normalize normalize) |
Single gap value from an override map, or nullopt when map lacks key. | |
| template<typename Normalize > | |
| std::optional<::PhosphorLayout::EdgeGaps > | outerGapsFromOverrideMap (const QVariantMap &map, int missingSideBase, Normalize normalize) |
| Resolve the outer-gap portion of an override map as ONE atomic layer. | |
Shared resolution of gap-override layers expressed as PerScreenKeys-shaped QVariantMaps (context-rule gap overrides, per-screen config overrides).
Both placement engines consume the same map shape: the snap-side geometry helpers (daemon GeometryUtils) and the autotile PerScreenConfigResolver previously each implemented this resolution with byte-identical layer semantics. This header is the single implementation; the normalize callable absorbs the one legitimate divergence (autotile clamps every map-sourced value to its gap range, snapping consumes raw values).
| std::optional< int > PhosphorEngine::GapResolution::gapFromOverrideMap | ( | const QVariantMap & | map, |
| QLatin1String | key, | ||
| Normalize | normalize | ||
| ) |
Single gap value from an override map, or nullopt when map lacks key.
normalize is applied to the map-sourced value.
| std::optional<::PhosphorLayout::EdgeGaps > PhosphorEngine::GapResolution::outerGapsFromOverrideMap | ( | const QVariantMap & | map, |
| int | missingSideBase, | ||
| Normalize | normalize | ||
| ) |
Resolve the outer-gap portion of an override map as ONE atomic layer.
Per-side values are honoured only when the map sets UsePerSideOuterGap, and if the layer yields any outer gap it wins wholesale — no per-key blending with lower-precedence layers. Missing sides in a partial per-side map fall back to the map's own uniform OuterGap or, failing that, missingSideBase (the caller's next-layer uniform value). Every consumed value — map-sourced or the missing-side base — goes through normalize, so a caller's clamp applies uniformly. Returns nullopt when the map carries no outer-gap info so the caller falls through to the next precedence layer.