LibGUI: Add ScrollableWidget::viewport_rect_in_content_coordinates()
This commit is contained in:
parent
718271c9df
commit
8fae4ee931
Notes:
sideshowbarker
2024-07-19 06:59:24 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8fae4ee931b
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue