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
Notes: sideshowbarker 2024-07-17 18:08:55 +09:00

View file

@ -95,6 +95,16 @@ public:
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:
int m_top { 0 };
int m_right { 0 };