summaryrefslogtreecommitdiff
path: root/modules/launcher/items
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-23 16:53:15 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-23 16:53:15 +1000
commitf52fb9bd9ee73d785c5a7141c1924a89e05f212a (patch)
tree5fdc891ac229e026c83575359c36d884bf1060f2 /modules/launcher/items
parentlauncher: add random wallpaper action (diff)
downloadcaelestia-shell-f52fb9bd9ee73d785c5a7141c1924a89e05f212a.tar.gz
caelestia-shell-f52fb9bd9ee73d785c5a7141c1924a89e05f212a.tar.bz2
caelestia-shell-f52fb9bd9ee73d785c5a7141c1924a89e05f212a.zip
launcher: show current scheme/variant
Also qsTr variant stuff
Diffstat (limited to 'modules/launcher/items')
-rw-r--r--modules/launcher/items/SchemeItem.qml29
-rw-r--r--modules/launcher/items/VariantItem.qml29
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
}
}
}