Fluid 1.3.0
Material Design for QtQuick and Qml
Loading...
Searching...
No Matches
ScrollIndicator.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
5import QtQuick.Templates as T
6import Fluid as MD
7
18T.ScrollIndicator {
19 id: control
20
21 Accessible.ignored: true
22
23 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding)
24 implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding)
25
26 padding: 2
27
28 contentItem: Rectangle {
29 implicitWidth: 4
30 implicitHeight: 4
31
32 color: MD.Utils.transparent(control.MD.Style.onSurfaceColor, 0.12)
33 visible: control.size < 1.0
34 opacity: 0.0
35
36 states: State {
37 name: "active"
38 when: control.active
39
40 PropertyChanges {
41 control.contentItem.opacity: 0.75
42 }
43 }
44
45 transitions: [
46 Transition {
47 from: "active"
48
49 SequentialAnimation {
50 PauseAnimation {
51 duration: MD.Tokens.motion.duration.long1
52 }
53 NumberAnimation {
54 target: control.contentItem
55 duration: MD.Tokens.motion.duration.short4
56 property: "opacity"
57 to: 0.0
58 }
59 }
60 }
61 ]
62 }
63}