From 651378d4965e1255abd524fd320f375639cd8bca Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 2 May 2025 14:57:59 +1000 Subject: launcher: add content Also use surfaceContainer as background --- modules/launcher/Content.qml | 68 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 modules/launcher/Content.qml (limited to 'modules/launcher/Content.qml') diff --git a/modules/launcher/Content.qml b/modules/launcher/Content.qml new file mode 100644 index 0000000..2f9fcdd --- /dev/null +++ b/modules/launcher/Content.qml @@ -0,0 +1,68 @@ +import "root:/widgets" +import "root:/config" +import Quickshell +import QtQuick + +Item { + implicitWidth: LauncherConfig.sizes.width + implicitHeight: search.height + list.height + Appearance.padding.large * 5 // Don't question it + anchors.horizontalCenter: parent.horizontalCenter + + StyledRect { + color: Appearance.alpha(Appearance.colours.m3surfaceContainerHigh, true) + radius: Appearance.rounding.large + implicitHeight: list.height + Appearance.padding.large * 2 + + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: search.top + anchors.bottomMargin: Appearance.spacing.normal + anchors.margins: Appearance.padding.large + + ListView { + id: list + + model: DesktopEntries.applications.values.filter(x => x.name.toLowerCase().includes(search.text.toLowerCase())) + + orientation: Qt.Vertical + verticalLayoutDirection: Qt.BottomToTop + height: 100 + width: 100 + + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.margins: Appearance.padding.large + + delegate: PaddedRect { + id: entry + + required property DesktopEntry modelData + + width: LauncherConfig.sizes.width + + StyledText { + text: modelData.name + font.family: Appearance.font.family.sans + font.pointSize: Appearance.font.size.smaller + } + } + } + } + + StyledTextField { + id: search + + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.margins: Appearance.padding.large + + placeholderText: "Type \">\" for commands" + + background: StyledRect { + color: Appearance.alpha(Appearance.colours.m3surfaceContainerHigh, true) + radius: Appearance.rounding.large + } + } +} -- cgit v1.2.3-freya