aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/assistant/Message.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/assistant/Message.qml')
-rw-r--r--desktop/assistant/Message.qml18
1 files changed, 14 insertions, 4 deletions
diff --git a/desktop/assistant/Message.qml b/desktop/assistant/Message.qml
index fcf77ec..0aa686a 100644
--- a/desktop/assistant/Message.qml
+++ b/desktop/assistant/Message.qml
@@ -100,17 +100,27 @@ Column {
model: msg.tools ? msg.tools.split(",") : []
Rectangle {
required property string modelData
- readonly property bool on: msg.live && msg.running === modelData
+ readonly property bool lit: msg.live && msg.running === modelData
+ property int elapsed: 0
width: chip.implicitWidth + 14
height: chip.implicitHeight + 6
radius: height / 2
color: Qt.alpha(Theme.surface, 0.9)
- opacity: on ? 1 : 0.55
+ opacity: lit ? 1 : 0.55
+ // A lit chip alone looks frozen on a clone that takes a
+ // minute, so the running tool counts seconds.
+ onLitChanged: if (!lit) elapsed = 0
+ Timer {
+ running: parent.lit
+ interval: 1000
+ repeat: true
+ onTriggered: parent.elapsed++
+ }
Text {
id: chip
anchors.centerIn: parent
- text: parent.modelData
- color: parent.on ? Theme.text : Theme.subtext
+ text: parent.modelData + (parent.lit ? " · " + parent.elapsed + "s" : "")
+ color: parent.lit ? Theme.text : Theme.subtext
font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 5 }
}
}