Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
EdgeGaps.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6namespace PhosphorLayout {
7
27{
34 static constexpr int UseGlobal = -1;
35
36 int top = 8;
37 int bottom = 8;
38 int left = 8;
39 int right = 8;
40 bool operator==(const EdgeGaps&) const = default;
41 bool isUniform() const
42 {
43 return top == bottom && bottom == left && left == right;
44 }
45 static EdgeGaps uniform(int gap)
46 {
47 return {gap, gap, gap, gap};
48 }
49};
50
51} // namespace PhosphorLayout
Definition AlgorithmMetadata.h:10
Per-side edge gap values (resolved, non-negative pixel values)
Definition EdgeGaps.h:27
int top
Definition EdgeGaps.h:36
bool operator==(const EdgeGaps &) const =default
int left
Definition EdgeGaps.h:38
static constexpr int UseGlobal
Sentinel value meaning "use the global edge-gap setting for this side" (rather than an explicit pixel...
Definition EdgeGaps.h:34
bool isUniform() const
Definition EdgeGaps.h:41
static EdgeGaps uniform(int gap)
Definition EdgeGaps.h:45
int right
Definition EdgeGaps.h:39
int bottom
Definition EdgeGaps.h:37