summaryrefslogtreecommitdiff
path: root/modules/launcher
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-02 17:03:36 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-02 17:03:36 +1000
commit7cbfce800a57091c20c7596f0875c8075166d110 (patch)
tree96d277f409c3ac2777af16d8eca6508f8c554a81 /modules/launcher
parentlauncher: animate content (diff)
downloadcaelestia-shell-7cbfce800a57091c20c7596f0875c8075166d110.tar.gz
caelestia-shell-7cbfce800a57091c20c7596f0875c8075166d110.tar.bz2
caelestia-shell-7cbfce800a57091c20c7596f0875c8075166d110.zip
launcher: better app items
Also config max shown Custom cursor for styled text field
Diffstat (limited to 'modules/launcher')
-rw-r--r--modules/launcher/AppItem.qml53
-rw-r--r--modules/launcher/Content.qml17
2 files changed, 55 insertions, 15 deletions
diff --git a/modules/launcher/AppItem.qml b/modules/launcher/AppItem.qml
new file mode 100644
index 0000000..24e0470
--- /dev/null
+++ b/modules/launcher/AppItem.qml
@@ -0,0 +1,53 @@
+import "root:/widgets"
+import "root:/config"
+import Quickshell
+import Quickshell.Widgets
+import QtQuick
+
+PaddedRect {
+ id: root
+
+ required property DesktopEntry modelData
+
+ implicitWidth: ListView.view.width
+ padding: [Appearance.padding.smaller, Appearance.padding.normal]
+ radius: Appearance.rounding.normal
+ color: Appearance.alpha(Appearance.colours.m3surfaceContainerHighest, true)
+
+ IconImage {
+ id: icon
+
+ source: Quickshell.iconPath(root.modelData.icon)
+ implicitSize: parent.height * 0.8
+
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Item {
+ anchors.left: icon.right
+ anchors.leftMargin: Appearance.spacing.normal
+ anchors.verticalCenter: icon.verticalCenter
+
+ implicitWidth: parent.width - icon.width
+ implicitHeight: childrenRect.height
+
+ StyledText {
+ id: name
+
+ text: root.modelData.name
+ font.pointSize: Appearance.font.size.normal
+ }
+
+ StyledText {
+ text: root.modelData.comment
+ // font.family: Appearance.font.family.mono
+ font.pointSize: Appearance.font.size.small
+ color: Appearance.alpha(Appearance.colours.m3outline, true)
+
+ elide: Text.ElideRight
+ width: root.width - icon.width - Appearance.rounding.normal * 2
+
+ anchors.top: name.bottom
+ }
+ }
+}
diff --git a/modules/launcher/Content.qml b/modules/launcher/Content.qml
index 5f99345..a41fca4 100644
--- a/modules/launcher/Content.qml
+++ b/modules/launcher/Content.qml
@@ -37,27 +37,14 @@ Item {
spacing: Appearance.spacing.small
orientation: Qt.Vertical
verticalLayoutDirection: Qt.BottomToTop
- implicitHeight: ((currentItem?.height ?? 1) + spacing) * Math.min(10, count) - spacing
+ implicitHeight: ((currentItem?.height ?? 1) + spacing) * Math.min(LauncherConfig.maxShown, count) - spacing
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
-
- radius: Appearance.rounding.normal
- color: Appearance.alpha(Appearance.colours.m3surfaceContainerHighest, true)
-
- StyledText {
- text: modelData.name
- font.family: Appearance.font.family.sans
- font.pointSize: Appearance.font.size.smaller
- }
- }
+ delegate: AppItem {}
add: Transition {
Anim {