diff options
Diffstat (limited to 'modules/launcher/items')
| -rw-r--r-- | modules/launcher/items/SchemeItem.qml | 29 | ||||
| -rw-r--r-- | modules/launcher/items/VariantItem.qml | 29 |
2 files changed, 41 insertions, 17 deletions
diff --git a/modules/launcher/items/SchemeItem.qml b/modules/launcher/items/SchemeItem.qml index 8cc2e33..f2246dc 100644 --- a/modules/launcher/items/SchemeItem.qml +++ b/modules/launcher/items/SchemeItem.qml @@ -67,25 +67,38 @@ Item { anchors.leftMargin: Appearance.spacing.normal anchors.verticalCenter: parent.verticalCenter - width: parent.width - preview.width + width: parent.width - preview.width - anchors.leftMargin - (current.active ? current.width + Appearance.spacing.normal : 0) spacing: 0 StyledText { - id: name - - text: root.modelData?.name ?? "" + text: root.modelData?.flavour ?? "" font.pointSize: Appearance.font.size.normal } StyledText { - id: comment - - text: root.modelData?.flavour ?? "" + text: root.modelData?.name ?? "" font.pointSize: Appearance.font.size.small color: Colours.palette.m3outline elide: Text.ElideRight - width: parent.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?.name} ${root.modelData?.flavour}` === Schemes.currentScheme + asynchronous: true + + sourceComponent: MaterialIcon { + text: "check" + color: Colours.palette.m3onSurfaceVariant + font.pointSize: Appearance.font.size.large } } } 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 } } } |