summaryrefslogtreecommitdiff
path: root/modules/launcher/items/VariantItem.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/launcher/items/VariantItem.qml')
-rw-r--r--modules/launcher/items/VariantItem.qml29
1 files changed, 20 insertions, 9 deletions
diff --git a/modules/launcher/items/VariantItem.qml b/modules/launcher/items/VariantItem.qml
index 71621ad..c7db975 100644
--- a/modules/launcher/items/VariantItem.qml
+++ b/modules/launcher/items/VariantItem.qml
@@ -38,32 +38,43 @@ Item {
anchors.verticalCenter: parent.verticalCenter
}
- Item {
+ Column {
anchors.left: icon.right
anchors.leftMargin: Appearance.spacing.larger
anchors.verticalCenter: icon.verticalCenter
- implicitWidth: parent.width - icon.width
- implicitHeight: name.implicitHeight + desc.implicitHeight
+ width: parent.width - icon.width - anchors.leftMargin - (current.active ? current.width + Appearance.spacing.normal : 0)
+ spacing: 0
StyledText {
- id: name
-
text: root.modelData?.name ?? ""
font.pointSize: Appearance.font.size.normal
}
StyledText {
- id: desc
-
text: root.modelData?.description ?? ""
font.pointSize: Appearance.font.size.small
color: Colours.palette.m3outline
elide: Text.ElideRight
- width: root.width - icon.width - Appearance.rounding.normal * 2
+ anchors.left: parent.left
+ anchors.right: parent.right
+ }
+ }
+
+ Loader {
+ id: current
+
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+
+ active: root.modelData?.variant === Schemes.currentVariant
+ asynchronous: true
- anchors.top: name.bottom
+ sourceComponent: MaterialIcon {
+ text: "check"
+ color: Colours.palette.m3onSurfaceVariant
+ font.pointSize: Appearance.font.size.large
}
}
}