diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-28 16:14:26 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-28 16:14:26 +0100 |
commit | 1fc03a7644290da0f15e73181547d90232f1cce5 (patch) | |
tree | dc7401c9b74b6fbe9aa9afccd928defcb0900976 /LibGUI/GFrame.h | |
parent | cb296ffede47d04c80870d1ccbba41efc03e0a8d (diff) | |
download | serenity-1fc03a7644290da0f15e73181547d90232f1cce5.zip |
LibGUI: Make GScrollableWidget a GFrame and fix up GTextEditor for it.
Diffstat (limited to 'LibGUI/GFrame.h')
-rw-r--r-- | LibGUI/GFrame.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/LibGUI/GFrame.h b/LibGUI/GFrame.h index c33b53cbbd..73ede6190c 100644 --- a/LibGUI/GFrame.h +++ b/LibGUI/GFrame.h @@ -19,7 +19,8 @@ public: Shape frame_shape() const { return m_shape; } void set_frame_shape(Shape shape) { m_shape = shape; } - Rect frame_inner_rect() const { return rect().shrunken(m_thickness * 2, m_thickness * 2); } + Rect frame_inner_rect_for_size(const Size& size) const { return { m_thickness, m_thickness, size.width() - m_thickness * 2, size.height() - m_thickness * 2 }; } + Rect frame_inner_rect() const { return frame_inner_rect_for_size(size()); } virtual const char* class_name() const override { return "GFrame"; } |