Warning, /plasma/plasma-welcome/src/qml/common/GenericPage.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *  SPDX-FileCopyrightText: 2021 Felipe Kinoshita <kinofhek@gmail.com>
0003  *  SPDX-FileCopyrightText: 2022 Nate Graham <nate@kde.org>
0004  *
0005  *  SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0006  */
0007 
0008 import QtQuick
0009 import QtQuick.Controls as QQC2
0010 import QtQuick.Layouts
0011 import org.kde.kirigami as Kirigami
0012 
0013 Kirigami.Page {
0014     id: page
0015 
0016     required property string heading
0017     required property string description
0018 
0019     property alias topContent: topContentLayout.children
0020 
0021     readonly property int margins: Kirigami.Units.gridUnit
0022 
0023     title: heading
0024     leftPadding: margins
0025     rightPadding: margins
0026 
0027     header: Item {
0028         height: layout.implicitHeight + (page.margins * 2)
0029 
0030         ColumnLayout {
0031             id: layout
0032             width: parent.width - (page.margins * 2)
0033             anchors.centerIn: parent
0034 
0035             QQC2.Label {
0036                 Layout.fillWidth: true
0037                 text: page.description
0038                 wrapMode: Text.WordWrap
0039             }
0040 
0041             ColumnLayout {
0042                 id: topContentLayout
0043             }
0044         }
0045     }
0046 }