Files
z-bar-qt/Modules/Launcher/Items/ActionItem.qml
zach 63b96471b0
C++ / fmt (pull_request) Failing after 3s
C++ / build (pull_request) Failing after 9s
C++ / clang-tidy (pull_request) Failing after 9s
JS/TS / fmt (pull_request) Successful in 9s
JS/TS / lint (pull_request) Successful in 10s
Python / static (pull_request) Successful in 28s
Rust / build (pull_request) Successful in 49s
Python / verify (pull_request) Successful in 1m40s
Rust / fmt (pull_request) Successful in 27s
Rust / clippy (pull_request) Successful in 46s
Merge branch 'main' into feat/llm-chat-tab
2026-09-30 17:59:14 +02:00

66 lines
1.3 KiB
QML

import QtQuick
import qs.Modules.Launcher.Services
import qs.Components
import qs.Helpers
import ZShell.Config
import qs.Services
Item {
id: root
required property var list
required property var modelData
anchors.left: parent?.left
anchors.right: parent?.right
implicitHeight: Config.launcher.sizes.itemHeight
StateLayer {
radius: Tokens.rounding.medium
onClicked: {
root.modelData?.onClicked(root.list);
}
}
Item {
anchors.fill: parent
anchors.leftMargin: Tokens.padding.small
anchors.margins: Tokens.padding.small
anchors.rightMargin: Tokens.padding.small
MaterialIcon {
id: icon
anchors.verticalCenter: parent.verticalCenter
fontStyle: Tokens.font.icon.large
text: root.modelData?.icon ?? ""
}
Item {
anchors.left: icon.right
anchors.leftMargin: Tokens.spacing.medium
anchors.verticalCenter: icon.verticalCenter
implicitHeight: name.implicitHeight + desc.implicitHeight
implicitWidth: parent.width - icon.width
CustomText {
id: name
text: root.modelData?.name ?? ""
}
CustomText {
id: desc
anchors.top: name.bottom
color: Colors.palette.m3outline
elide: Text.ElideRight
font: Tokens.font.body.small
text: root.modelData?.desc ?? ""
width: root.width - icon.width - Tokens.rounding.medium * 2
}
}
}
}