summaryrefslogtreecommitdiff
path: root/modules/launcher/Content.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-02 14:57:59 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-02 14:57:59 +1000
commit651378d4965e1255abd524fd320f375639cd8bca (patch)
tree447f257b511354a147c3f0df5cc04efe1a2e70d8 /modules/launcher/Content.qml
parentrefactor: separate launcher into multiple files (diff)
downloadcaelestia-shell-651378d4965e1255abd524fd320f375639cd8bca.tar.gz
caelestia-shell-651378d4965e1255abd524fd320f375639cd8bca.tar.bz2
caelestia-shell-651378d4965e1255abd524fd320f375639cd8bca.zip
launcher: add content
Also use surfaceContainer as background
Diffstat (limited to 'modules/launcher/Content.qml')
-rw-r--r--modules/launcher/Content.qml68
1 files changed, 68 insertions, 0 deletions
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
+ }
+ }
+}