use blobgroup for window chat interface + slim sidebar

This commit is contained in:
2026-09-30 15:01:28 +02:00
parent a8fdc31b8d
commit e700a4f96b
6 changed files with 224 additions and 122 deletions
@@ -11,6 +11,7 @@ CustomClippingRect {
property bool expanded: false
property bool highlighted: false
property bool slim: false
required property ChatSession modelData
signal clicked(content: ChatSession)
@@ -20,6 +21,9 @@ CustomClippingRect {
implicitHeight: {
let h = 0;
if (slim)
return chatIcon.implicitHeight + chatIcon.anchors.topMargin * 2;
h += infoContainer.implicitHeight;
if (expanded)
@@ -85,6 +89,14 @@ CustomClippingRect {
return h;
}
opacity: root.slim ? 0 : 1
Behavior on opacity {
Anim {
type: Anim.DefaultEffects
}
}
CustomRect {
id: title
@@ -246,7 +258,7 @@ CustomClippingRect {
color: Colors.palette.m3onSurfaceVariant
font.pointSize: Tokens.font.size.small
maximumLineCount: 1
opacity: !root.expanded ? 1 : 0
opacity: !root.expanded && !root.slim ? 1 : 0
text: root.modelData.messagesModel.lastMessage?.activeGeneration.content.replace(/\s+/g, " ").trim() ?? qsTr("No messages yet")
Behavior on y {
@@ -347,6 +359,16 @@ CustomClippingRect {
radius: Tokens.rounding.full
color: Colors.layer(Colors.palette.m3surfaceContainerHighest, 3)
opacity: root.slim ? 0 : 1
visible: opacity > 0
enabled: visible
Behavior on opacity {
Anim {
type: Anim.DefaultEffects
}
}
StateLayer {
onClicked: root.expanded = !root.expanded
}