blob: 9a779686114f695ebd70534738cb66886b58285c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
pragma ComponentBehavior: Bound
import qs.components
import qs.config
import QtQuick
import QtQuick.Layouts
/**
* SettingsHeader
*
* Reusable header component for settings panes. Displays a large icon and title
* in a consistent format across all settings screens.
*
* Usage:
* ```qml
* SettingsHeader {
* icon: "router"
* title: qsTr("Network Settings")
* }
* ```
*/
Item {
id: root
/**
* Material icon name to display
*/
required property string icon
/**
* Title text to display
*/
required property string title
Layout.fillWidth: true
implicitHeight: column.implicitHeight
ColumnLayout {
id: column
anchors.centerIn: parent
spacing: Appearance.spacing.normal
MaterialIcon {
Layout.alignment: Qt.AlignHCenter
text: root.icon
font.pointSize: Appearance.font.size.extraLarge * 3
font.bold: true
}
StyledText {
Layout.alignment: Qt.AlignHCenter
text: root.title
font.pointSize: Appearance.font.size.large
font.bold: true
}
}
}
|