Feat: replaced duplicate animation style for processing prompt indicator
This commit is contained in:
parent
4e57a4d730
commit
fdc0066cab
1 changed files with 29 additions and 20 deletions
|
|
@ -558,30 +558,39 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Streaming indicator before first content: the tumbling hex
|
// Streaming indicator before first content: a plain status
|
||||||
// sphere (same small config as the footer status row) with a
|
// label breathing toward the accent — same 750 ms cadence as
|
||||||
// plain status label.
|
// the tool chip's in-flight pulse.
|
||||||
Row {
|
Text {
|
||||||
id: promptRow
|
id: promptRow
|
||||||
visible: isStreaming && content.length === 0 && thinking.length === 0
|
visible: isStreaming && content.length === 0 && thinking.length === 0
|
||||||
spacing: 8
|
|
||||||
|
|
||||||
HexSphereLogo {
|
|
||||||
radius: 11
|
|
||||||
strokeWidth: 1.5
|
|
||||||
subdivisions: 1
|
|
||||||
yawRate: 20
|
|
||||||
pitchRate: 8
|
|
||||||
interactive: false
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
visible: promptRow.visible
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
text: "Processing prompt"
|
text: "Processing prompt"
|
||||||
color: Theme.surfaceVariantText
|
|
||||||
font.pixelSize: 11
|
font.pixelSize: 11
|
||||||
|
|
||||||
|
// 0 → 1 → 0 while the label shows; lerps the color toward
|
||||||
|
// the accent (k = 0.55, matching breatheColor on the chips).
|
||||||
|
property real breathe: 0
|
||||||
|
SequentialAnimation on breathe {
|
||||||
|
running: promptRow.visible
|
||||||
|
loops: Animation.Infinite
|
||||||
|
NumberAnimation {
|
||||||
|
from: 0; to: 1; duration: 750
|
||||||
|
easing.type: Easing.InOutSine
|
||||||
|
}
|
||||||
|
NumberAnimation {
|
||||||
|
from: 1; to: 0; duration: 750
|
||||||
|
easing.type: Easing.InOutSine
|
||||||
|
}
|
||||||
|
}
|
||||||
|
color: {
|
||||||
|
var k = breathe * 0.55;
|
||||||
|
var base = Theme.surfaceVariantText;
|
||||||
|
var accent = Theme.primary;
|
||||||
|
return Qt.rgba(
|
||||||
|
base.r + (accent.r - base.r) * k,
|
||||||
|
base.g + (accent.g - base.g) * k,
|
||||||
|
base.b + (accent.b - base.b) * k,
|
||||||
|
1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue