Files
qt-creator/share/qtcreator/qmldesigner/welcomepage/CustomScrollView.qml
Thomas Hartmann b47e074f62 QmlDesigner: Add QML source
This adds the QML source for the Qt Design Studio Welcome page.
The source code was private before.

Change-Id: I5dcb900ed9a17b1bc3bbcaf50f649ebeb61cc8bf
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-01-17 09:46:02 +00:00

26 lines
667 B
QML

// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
import QtQuick
import QtQuick.Templates as T
T.ScrollView {
id: control
property bool outsideHover: false
hoverEnabled: true
T.ScrollBar.vertical: CustomScrollBar {
id: verticalScrollBar
parent: control
x: control.width + (verticalScrollBar.inUse ? 4 : 5)
y: control.topPadding
height: control.availableHeight
orientation: Qt.Vertical
show: (control.hovered || control.focus || control.outsideHover)
&& verticalScrollBar.isNeeded
}
}