From 1fc03a7644290da0f15e73181547d90232f1cce5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 28 Mar 2019 16:14:26 +0100 Subject: LibGUI: Make GScrollableWidget a GFrame and fix up GTextEditor for it. --- LibGUI/GFrame.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'LibGUI/GFrame.h') 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"; } -- cgit v1.2.3