feat(wayland): custom layershell implementation

A fair amount of things are broken but not in the layershell interface
itself. The shell window platform extensions are next in line for
refactoring and relevent issues will be fixed then. Same for docs.
This commit is contained in:
outfoxxed 2024-02-24 02:06:40 -08:00
parent b0567a569b
commit 4a82949854
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
21 changed files with 1167 additions and 401 deletions

View file

@ -20,6 +20,18 @@ class Anchors {
Q_PROPERTY(bool bottom MEMBER mBottom);
public:
[[nodiscard]] bool horizontalConstraint() const noexcept { return this->mLeft && this->mRight; }
[[nodiscard]] bool verticalConstraint() const noexcept { return this->mTop && this->mBottom; }
[[nodiscard]] bool operator==(const Anchors& other) const noexcept {
// clang-format off
return this->mLeft == other.mLeft
&& this->mRight == other.mRight
&& this->mTop == other.mTop
&& this->mBottom == other.mBottom;
// clang-format on
}
bool mLeft = false;
bool mRight = false;
bool mTop = false;
@ -34,6 +46,15 @@ class Margins {
Q_PROPERTY(qint32 bottom MEMBER mBottom);
public:
[[nodiscard]] bool operator==(const Margins& other) const noexcept {
// clang-format off
return this->mLeft == other.mLeft
&& this->mRight == other.mRight
&& this->mTop == other.mTop
&& this->mBottom == other.mBottom;
// clang-format on
}
qint32 mLeft = 0;
qint32 mRight = 0;
qint32 mTop = 0;