diff options
Diffstat (limited to '')
| -rw-r--r-- | src/widgets/WebViewStack.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/widgets/WebViewStack.cpp b/src/widgets/WebViewStack.cpp index 9eef92a..53224c5 100644 --- a/src/widgets/WebViewStack.cpp +++ b/src/widgets/WebViewStack.cpp @@ -276,3 +276,33 @@ void WebViewStack::set_webview_url(const QUrl &url, WebViewId webview_id) { webview->setUrl(url); } + +void WebViewStack::scroll(WebViewId webview_id, int deltax, int deltay) { + auto *webview = get_webview(webview_id); + if (webview == nullptr) { + qDebug() << "Webview does not exist"; + return; + } + + webview->scroll_increment(deltax, deltay); +} + +void WebViewStack::scroll_to_top(WebViewId webview_id) { + auto *webview = get_webview(webview_id); + if (webview == nullptr) { + qDebug() << "Webview does not exist"; + return; + } + + webview->scroll_to_top(); +} + +void WebViewStack::scroll_to_bottom(WebViewId webview_id) { + auto *webview = get_webview(webview_id); + if (webview == nullptr) { + qDebug() << "Webview does not exist"; + return; + } + + webview->scroll_to_bottom(); +} |
