diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-07 16:59:13 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-07 16:59:13 +1000 |
| commit | a9f7d1efc154ee039c47cf37cb48342b08848014 (patch) | |
| tree | 44c4034461d2803d7fdef6dc352b4479de53a0ed /modules/controlcenter/WindowTitle.qml | |
| parent | controlcenter: fix navrail colours (diff) | |
| download | caelestia-shell-a9f7d1efc154ee039c47cf37cb48342b08848014.tar.gz caelestia-shell-a9f7d1efc154ee039c47cf37cb48342b08848014.tar.bz2 caelestia-shell-a9f7d1efc154ee039c47cf37cb48342b08848014.zip | |
controlcenter: add header when floating
Diffstat (limited to 'modules/controlcenter/WindowTitle.qml')
| -rw-r--r-- | modules/controlcenter/WindowTitle.qml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/modules/controlcenter/WindowTitle.qml b/modules/controlcenter/WindowTitle.qml new file mode 100644 index 0000000..35af9a1 --- /dev/null +++ b/modules/controlcenter/WindowTitle.qml @@ -0,0 +1,51 @@ +import qs.components +import qs.services +import qs.config +import Quickshell +import QtQuick + +StyledRect { + id: root + + required property ShellScreen screen + required property Session session + + implicitHeight: text.implicitHeight + Appearance.padding.normal + color: Colours.palette.m3surfaceContainer + + StyledText { + id: text + + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + + text: qsTr("Caelestia Settings - %1").arg(root.session.active) + font.capitalization: Font.Capitalize + font.pointSize: Appearance.font.size.larger + font.weight: 500 + } + + Item { + anchors.right: parent.right + anchors.top: parent.top + anchors.margins: Appearance.padding.normal + + implicitWidth: implicitHeight + implicitHeight: closeIcon.implicitHeight + Appearance.padding.small + + StateLayer { + radius: Appearance.rounding.full + + function onClicked(): void { + QsWindow.window.destroy(); + } + } + + MaterialIcon { + id: closeIcon + + anchors.centerIn: parent + text: "close" + } + } +} |