Fluid 1.3.0
Material Design for QtQuick and Qml
Loading...
Searching...
No Matches
ScrollView.qml
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2// SPDX-License-Identifier: MPL-2.0
3
4import QtQuick.Templates as T
5import Fluid as MD
6
17T.ScrollView {
18 id: control
19
20 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding)
21 implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding)
22
23 ScrollBar.vertical: MD.ScrollBar {
24 parent: control
25
26 x: control.mirrored ? 0 : control.width - width
27 y: control.topPadding
28
29 height: control.availableHeight
30
31 active: control.ScrollBar.horizontal.active
32 }
33
34 ScrollBar.horizontal: MD.ScrollBar {
35 parent: control
36
37 x: control.leftPadding
38 y: control.height - height
39
40 width: control.availableWidth
41
42 active: control.ScrollBar.vertical.active
43 }
44}