mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-19 07:49:05 +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
Notes:
sideshowbarker
2024-07-17 11:30:54 +09:00
Author: https://github.com/fluxth
Commit: d89fbf3aa0
Pull-request: https://github.com/SerenityOS/serenity/pull/16583
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/awesomekling ✅
Reviewed-by: https://github.com/linusg
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