diff options
| author | ATMDA <atdma2600@gmail.com> | 2025-11-19 17:20:00 -0500 |
|---|---|---|
| committer | ATMDA <atdma2600@gmail.com> | 2025-11-19 17:20:00 -0500 |
| commit | e8fc13630c2fb67d75325e72ba66a811d3c1f4c9 (patch) | |
| tree | a6b34805173449d360cfb610128fdd74570d40ba /modules/controlcenter/components | |
| parent | refactor: created pane registry (diff) | |
| download | caelestia-shell-e8fc13630c2fb67d75325e72ba66a811d3c1f4c9.tar.gz caelestia-shell-e8fc13630c2fb67d75325e72ba66a811d3c1f4c9.tar.bz2 caelestia-shell-e8fc13630c2fb67d75325e72ba66a811d3c1f4c9.zip | |
refactor: SettingsHeader on all panels
Diffstat (limited to 'modules/controlcenter/components')
| -rw-r--r-- | modules/controlcenter/components/SettingsHeader.qml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/modules/controlcenter/components/SettingsHeader.qml b/modules/controlcenter/components/SettingsHeader.qml new file mode 100644 index 0000000..9a77968 --- /dev/null +++ b/modules/controlcenter/components/SettingsHeader.qml @@ -0,0 +1,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 + } + } +} + |