1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

LibGUI: Add ScrollableWidget::viewport_rect_in_content_coordinates()

This commit is contained in:
Andreas Kling 2020-05-04 22:33:20 +02:00
parent 718271c9df
commit 8fae4ee931

View file

@ -43,6 +43,13 @@ public:
Gfx::Rect widget_inner_rect() const;
Gfx::Rect viewport_rect_in_content_coordinates() const
{
auto viewport_rect = visible_content_rect();
viewport_rect.set_size(widget_inner_rect().size());
return viewport_rect;
}
void scroll_into_view(const Gfx::Rect&, Orientation);
void scroll_into_view(const Gfx::Rect&, bool scroll_horizontally, bool scroll_vertically);