TeamSpeak streams carry no thumbnail, and a peek would be a join request the streamer sees, so a stream card not being watched now shows the streamer: their avatar, ringed, with what they share, on the art scene tinted with their colour (Art moves from home.slint to components). The compact rows and the phone's Activity cards show the avatar too, and our own stream from the Stream Studio shows the studio's picture while live. StreamItem gets avatar, initials, tint and studio; the kind label is the pure vm::streams::kind_label, used by Home as well. In the demo, the studio going live announces our stream, and studio:live starts the studio itself, so studio:live,server,voice shows the card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
18 lines
849 B
Plaintext
18 lines
849 B
Plaintext
// A painted picture (Icons.art-*) covering an area of the given size, cut
|
|
// at the sides or at the bottom by the parent's clip. Drawn at its own
|
|
// aspect ratio: with `image-fit: cover` the renderer would draw the SVG at
|
|
// another size and stretch it, which looks jagged.
|
|
export component Art inherits Image {
|
|
in property <length> cover-width;
|
|
in property <length> cover-height;
|
|
// 0: keep the left (top) edge, 1: the right (bottom) one.
|
|
in property <float> align-x: 0.5;
|
|
in property <float> align-y: 0.5;
|
|
property <float> ratio: self.source.width * 1.0 / max(1, self.source.height);
|
|
width: max(root.cover-width, root.cover-height * root.ratio);
|
|
height: self.width / root.ratio;
|
|
x: (root.cover-width - self.width) * root.align-x;
|
|
y: (root.cover-height - self.height) * root.align-y;
|
|
image-fit: fill;
|
|
}
|