mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 07:05:08 +00:00
GScrollableWidget: The visible_content_rect() should be max content_size().
When computing the visible content rect, constrain the result to the content size. The content shouldn't feel responsible for painting anything outside.
This commit is contained in:
parent
7dc4078a73
commit
3543236e8f
1 changed files with 2 additions and 2 deletions
|
@ -96,8 +96,8 @@ Rect GScrollableWidget::visible_content_rect() const
|
|||
return {
|
||||
m_horizontal_scrollbar->value(),
|
||||
m_vertical_scrollbar->value(),
|
||||
frame_inner_rect().width() - width_occupied_by_vertical_scrollbar() - m_size_occupied_by_fixed_elements.width(),
|
||||
frame_inner_rect().height() - height_occupied_by_horizontal_scrollbar() - m_size_occupied_by_fixed_elements.height()
|
||||
min(m_content_size.width(), frame_inner_rect().width() - width_occupied_by_vertical_scrollbar() - m_size_occupied_by_fixed_elements.width()),
|
||||
min(m_content_size.height(), frame_inner_rect().height() - height_occupied_by_horizontal_scrollbar() - m_size_occupied_by_fixed_elements.height())
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue