| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2021 George Florea Bănuș <[email protected]> |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: GPL-3.0-or-later |
| 5 |
*/ |
| 6 |
|
| 7 |
import QtQuick |
| 8 |
import QtQuick.Layouts |
| 9 |
|
| 10 |
import org.kde.kirigami as Kirigami |
| 11 |
|
| 12 |
ColumnLayout { |
| 13 |
id: root |
| 14 |
|
| 15 |
property int headingLevel: 1 |
| 16 |
property string text: "" |
| 17 |
property int topMargin: Kirigami.Units.gridUnit |
| 18 |
|
| 19 |
spacing: 0 |
| 20 |
|
| 21 |
RowLayout { |
| 22 |
Layout.topMargin: root.topMargin |
| 23 |
|
| 24 |
Rectangle { |
| 25 |
color: Kirigami.Theme.alternateBackgroundColor |
| 26 |
Layout.preferredWidth: Kirigami.Units.gridUnit |
| 27 |
Layout.preferredHeight: 1 |
| 28 |
} |
| 29 |
|
| 30 |
Kirigami.Heading { |
| 31 |
text: root.text |
| 32 |
level: root.headingLevel |
| 33 |
} |
| 34 |
|
| 35 |
Rectangle { |
| 36 |
color: Kirigami.Theme.alternateBackgroundColor |
| 37 |
Layout.preferredHeight: 1 |
| 38 |
Layout.fillWidth: true |
| 39 |
} |
| 40 |
} |
| 41 |
} |