From 7cbfce800a57091c20c7596f0875c8075166d110 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 2 May 2025 17:03:36 +1000 Subject: launcher: better app items Also config max shown Custom cursor for styled text field --- modules/launcher/AppItem.qml | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 modules/launcher/AppItem.qml (limited to 'modules/launcher/AppItem.qml') 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 + } + } +} -- cgit v1.2.3-freya