blob: d8e45d6a0178c86665286ed38b1869f08a4d24d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Controls.Basic
ScrollBar {
id: root
required property real pageMargin
contentItem: Rectangle {
color: ViewSettings.scrollBarColor
implicitWidth: root.orientation === Qt.Horizontal ? root.availableWidth : root.pageMargin * 0.25
implicitHeight: root.orientation === Qt.Vertical ? root.availableHeight : root.pageMargin * 0.25
opacity: (root.active && root.size < 1.0) ? 1.0 : 0
Behavior on opacity { OpacityAnimator { duration: 500 } }
}
}
|