1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:07:34 +00:00

LibGUI: Add horizontal and vertical totals to Margins

This commit is contained in:
FrHun 2022-07-04 05:32:51 +02:00 committed by Andreas Kling
parent dba6f0bc4b
commit 309874b4fb

View file

@ -95,6 +95,16 @@ public:
return m_top + m_bottom; return m_top + m_bottom;
} }
[[nodiscard]] int horizontal_total() const
{
return m_left + m_right;
}
[[nodiscard]] int vertical_total() const
{
return m_top + m_bottom;
}
private: private:
int m_top { 0 }; int m_top { 0 };
int m_right { 0 }; int m_right { 0 };