Verified Commit bd3783dc authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Replace QtWebEngine scrollbar with the controls one

parent 16ece25d
......@@ -105,7 +105,7 @@ WebEngineView {
// Load larger touch icons
touchIconsEnabled: true
// Disable scrollbars on mobile
showScrollBars: !Kirigami.Settings.isMobile
showScrollBars: false
}
// Custom context menu
......
......@@ -24,6 +24,7 @@ import QtWebEngine 1.6
import QtQuick.Window 2.3
import QtGraphicalEffects 1.0
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.2 as Controls
import org.kde.kirigami 2.7 as Kirigami
......@@ -38,7 +39,7 @@ Kirigami.ApplicationWindow {
* Browser-level functionality should use this to refer to the current
* view, rather than looking up views in the mode, as far as possible.
*/
property Item currentWebView: tabs.currentItem
property WebView currentWebView: tabs.currentItem
// Pointer to the currently active list of tabs.
//
......@@ -160,6 +161,17 @@ Kirigami.ApplicationWindow {
privateTabsMode: true
}
Controls.ScrollBar {
visible: true
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
position: currentWebView.scrollPosition.y / currentWebView.contentsSize.height
orientation: Qt.Vertical
size: currentWebView.height / currentWebView.contentsSize.height
interactive: false
}
ErrorHandler {
id: errorHandler
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment