core/panelwindow: move Margins to types.hpp

This commit is contained in:
outfoxxed 2025-05-30 00:26:41 -07:00
parent 2773e5468f
commit ef077ddd24
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
5 changed files with 51 additions and 44 deletions

View file

@ -5,6 +5,7 @@
#include <qtypes.h>
#include "../core/doc.hpp"
#include "../core/types.hpp"
#include "windowinterface.hpp"
class Anchors {
@ -35,31 +36,6 @@ public:
bool mBottom = false;
};
class Margins {
Q_GADGET;
Q_PROPERTY(qint32 left MEMBER mLeft);
Q_PROPERTY(qint32 right MEMBER mRight);
Q_PROPERTY(qint32 top MEMBER mTop);
Q_PROPERTY(qint32 bottom MEMBER mBottom);
QML_VALUE_TYPE(panelMargins);
QML_STRUCTURED_VALUE;
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;
qint32 mBottom = 0;
};
///! Panel exclusion mode
/// See @@PanelWindow.exclusionMode.
namespace ExclusionMode { // NOLINT