diff options
Diffstat (limited to 'modules/launcher/AppItem.qml')
| -rw-r--r-- | modules/launcher/AppItem.qml | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/modules/launcher/AppItem.qml b/modules/launcher/AppItem.qml index 1c4b691..ab815ab 100644 --- a/modules/launcher/AppItem.qml +++ b/modules/launcher/AppItem.qml @@ -5,14 +5,13 @@ import Quickshell import Quickshell.Widgets import QtQuick -PaddedRect { +Item { id: root required property DesktopEntry modelData required property PersistentProperties visibilities implicitHeight: LauncherConfig.sizes.itemHeight - padding: [Appearance.padding.smaller, Appearance.padding.normal] anchors.left: parent.left anchors.right: parent.right @@ -26,39 +25,46 @@ PaddedRect { } } - IconImage { - id: icon + Item { + anchors.fill: parent + anchors.leftMargin: Appearance.padding.larger + anchors.rightMargin: Appearance.padding.larger + anchors.margins: Appearance.padding.smaller - source: Quickshell.iconPath(root.modelData.icon, "image-missing") - implicitSize: parent.height * 0.8 + IconImage { + id: icon - anchors.verticalCenter: parent.verticalCenter - } + source: Quickshell.iconPath(root.modelData.icon, "image-missing") + implicitSize: parent.height * 0.8 - Item { - anchors.left: icon.right - anchors.leftMargin: Appearance.spacing.normal - anchors.verticalCenter: icon.verticalCenter + anchors.verticalCenter: parent.verticalCenter + } - implicitWidth: parent.width - icon.width - implicitHeight: childrenRect.height + Item { + anchors.left: icon.right + anchors.leftMargin: Appearance.spacing.normal + anchors.verticalCenter: icon.verticalCenter - StyledText { - id: name + implicitWidth: parent.width - icon.width + implicitHeight: childrenRect.height - text: root.modelData.name - font.pointSize: Appearance.font.size.normal - } + StyledText { + id: name + + text: root.modelData.name + font.pointSize: Appearance.font.size.normal + } - StyledText { - text: root.modelData.comment || root.modelData.genericName || root.modelData.name - font.pointSize: Appearance.font.size.small - color: Colours.alpha(Colours.palette.m3outline, true) + StyledText { + text: root.modelData.comment || root.modelData.genericName || root.modelData.name + font.pointSize: Appearance.font.size.small + color: Colours.alpha(Colours.palette.m3outline, true) - elide: Text.ElideRight - width: root.width - icon.width - Appearance.rounding.normal * 2 + elide: Text.ElideRight + width: root.width - icon.width - Appearance.rounding.normal * 2 - anchors.top: name.bottom + anchors.top: name.bottom + } } } } |