summaryrefslogtreecommitdiff
path: root/SharedGraphics/Size.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-19 03:00:42 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-19 03:00:42 +0100
commite15cc4509fdd178f1d682c7dde25c6122c32e6ec (patch)
tree2eeecc1a961289f46f5e2f82e9444224d4aa7b18 /SharedGraphics/Size.h
parent46577a69486212b03ae0b94767cb2264d178dc40 (diff)
downloadserenity-e15cc4509fdd178f1d682c7dde25c6122c32e6ec.zip
LibGUI: More GInputBox refinements.
Fix some GBoxLayout bugs to make the buttons in GInputBox line up better. There are still some imperfections due to rounding errors.
Diffstat (limited to 'SharedGraphics/Size.h')
-rw-r--r--SharedGraphics/Size.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/SharedGraphics/Size.h b/SharedGraphics/Size.h
index 62cf8b1c4b..469bb7aaf9 100644
--- a/SharedGraphics/Size.h
+++ b/SharedGraphics/Size.h
@@ -39,6 +39,13 @@ public:
return *this;
}
+ Size& operator+=(const Size& other)
+ {
+ m_width += other.m_width;
+ m_height += other.m_height;
+ return *this;
+ }
+
operator WSAPI_Size() const;
String to_string() const { return String::format("[%d,%d]", m_width, m_height); }