Warning, /frameworks/kcmutils/src/qml/components/ScrollView.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2018 Marco Martin <mart@kde.org> 0003 SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 import QtQuick 2.7 0009 import QtQuick.Controls 2.2 as QQC2 0010 import org.kde.kirigami 2.3 as Kirigami 0011 0012 /** 0013 * A ScrollView containing a GridView, with the default behavior about 0014 * sizing and background as recommended by the user interface guidelines 0015 * For most KControl modules, it's recommended to use instead the GridViewKCM 0016 * component as the root element of your module. 0017 * @code 0018 * import org.kde.kcmutils as KCM 0019 * KCM.ScrollView { 0020 * view: ListView { 0021 * ... 0022 * } 0023 * } 0024 * @endcode 0025 * @see GridViewKCM 0026 */ 0027 QQC2.ScrollView { 0028 id: scroll 0029 0030 /** 0031 * view: GridView 0032 * Exposes the internal flickable 0033 */ 0034 property Flickable view 0035 property bool framedView: true 0036 0037 contentItem: view 0038 onViewChanged: { 0039 view.parent = scroll; 0040 if (!view.KeyNavigation.up) { 0041 view.KeyNavigation.up = Qt.binding(() => root.globalToolBarItem); 0042 } 0043 } 0044 0045 activeFocusOnTab: false 0046 Kirigami.Theme.colorSet: Kirigami.Theme.View 0047 Kirigami.Theme.inherit: false 0048 0049 Component.onCompleted: { 0050 if (background) { 0051 background.visible = Qt.binding(() => framedView); 0052 } 0053 } 0054 0055 QQC2.ScrollBar.horizontal.visible: false 0056 }