mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
Ladybird: Set pageStep for scroll bars in WebView
This allows PageUp/PageDown keys to scroll 1 viewport size at a time. This also fixes the scroll bar drag handle to be a correct length.
This commit is contained in:
parent
096164ea1a
commit
d89fbf3aa0
1 changed files with 2 additions and 0 deletions
|
@ -248,7 +248,9 @@ public:
|
|||
content_size = enclosing_int_rect(layout_root->paint_box()->absolute_rect()).size();
|
||||
|
||||
m_view.verticalScrollBar()->setMaximum(content_size.height() - m_viewport_rect.height());
|
||||
m_view.verticalScrollBar()->setPageStep(m_viewport_rect.height());
|
||||
m_view.horizontalScrollBar()->setMaximum(content_size.width() - m_viewport_rect.width());
|
||||
m_view.horizontalScrollBar()->setPageStep(m_viewport_rect.width());
|
||||
}
|
||||
|
||||
virtual void page_did_request_scroll_into_view(Gfx::IntRect const&) override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue