diff --git a/Libraries/LibGUI/ScrollableWidget.h b/Libraries/LibGUI/ScrollableWidget.h index 9604e5005d..349a16a5c7 100644 --- a/Libraries/LibGUI/ScrollableWidget.h +++ b/Libraries/LibGUI/ScrollableWidget.h @@ -77,6 +77,9 @@ public: Gfx::IntPoint to_content_position(const Gfx::IntPoint& widget_position) const; Gfx::IntPoint to_widget_position(const Gfx::IntPoint& content_position) const; + Gfx::IntRect to_content_rect(const Gfx::IntRect& widget_rect) const { return { to_content_position(widget_rect.location()), widget_rect.size() }; } + Gfx::IntRect to_widget_rect(const Gfx::IntRect& content_rect) const { return { to_widget_position(content_rect.location()), content_rect.size() }; } + protected: ScrollableWidget(); virtual void custom_layout() override;