summaryrefslogtreecommitdiff
path: root/modules/launcher/ActionItem.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/launcher/ActionItem.qml')
-rw-r--r--modules/launcher/ActionItem.qml60
1 files changed, 33 insertions, 27 deletions
diff --git a/modules/launcher/ActionItem.qml b/modules/launcher/ActionItem.qml
index f4f7e2f..800c937 100644
--- a/modules/launcher/ActionItem.qml
+++ b/modules/launcher/ActionItem.qml
@@ -3,59 +3,65 @@ import "root:/services"
import "root:/config"
import QtQuick
-PaddedRect {
+Item {
id: root
required property Actions.Action modelData
required property var list
implicitHeight: LauncherConfig.sizes.itemHeight
- padding: [Appearance.padding.smaller, Appearance.padding.larger]
anchors.left: parent.left
anchors.right: parent.right
StateLayer {
- radius: Appearance.rounding.normal
+ radius: Appearance.rounding.full
function onClicked(): void {
root.modelData.onClicked(root.list);
}
}
- MaterialIcon {
- id: icon
+ Item {
+ anchors.fill: parent
+ anchors.leftMargin: Appearance.padding.larger
+ anchors.rightMargin: Appearance.padding.larger
+ anchors.margins: Appearance.padding.smaller
- text: root.modelData.icon
- font.pointSize: Appearance.font.size.extraLarge
+ MaterialIcon {
+ id: icon
- anchors.verticalCenter: parent.verticalCenter
- }
+ text: root.modelData.icon
+ font.pointSize: Appearance.font.size.extraLarge
- Item {
- anchors.left: icon.right
- anchors.leftMargin: Appearance.spacing.larger
- 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.larger
+ 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.desc
- font.pointSize: Appearance.font.size.small
- color: Colours.alpha(Colours.palette.m3outline, true)
+ StyledText {
+ text: root.modelData.desc
+ 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
+ }
}
}
}