import Weave.Templates as T import Weave.Controls T.ScrollView { id: scrollView implicitWidth: Math.max( implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) implicitHeight: Math.max( implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) hoverEnabled: scrollView.enabled ScrollBar.vertical: ScrollBar { parent: scrollView anchors.top: scrollView.top anchors.bottom: scrollView.bottom anchors.right: scrollView.right leftPadding: 2 // TODO: ScrollBar-specific theme constant rightPadding: 2 // TODO: ScrollBar-specific theme constant height: scrollView.availableHeight active: scrollView.ScrollBar.horizontal.active } ScrollBar.horizontal: ScrollBar { parent: scrollView anchors.left: scrollView.left anchors.bottom: scrollView.bottom anchors.right: scrollView.right topPadding: 2 // TODO: ScrollBar-specific theme constant bottomPadding: 2 // TODO: ScrollBar-specific theme constant width: scrollView.availableWidth active: scrollView.ScrollBar.vertical.active } }