ui: other people's badges, named on the member card and drawn after their name

Clients only send badge GUIDs. voelin-model names them from tsclientlib's
table plus the newer entries of TeamSpeak's own list, and the engine fetches
the first three pictures of each client from TeamSpeak's badge server
(<guid>/<filename>.svg, checked to answer) with the banners, under
cache.fetch_images.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
This commit is contained in:
Claude committed 2026-10-06 20:16:37 +00:00
1 parent 68dd48d607
commit 9e0f0e05ad
19 files changed
+554 -30

No files matched your search

@@ -53,6 +53,8 @@ export component LiveBadge inherits Rectangle {
export component Chip inherits Rectangle {
in property <string> text;
in property <image> icon;
// A picture in its own colours (a badge's), instead of a tinted icon.
in property <image> picture;
in property <color> tint: Theme.text-secondary;
in property <brush> fill: Theme.surface-3;
in property <bool> outlined;
@@ -76,6 +78,14 @@ export component Chip inherits Rectangle {
tint: root.tint;
y: (parent.height - self.height) / 2;
}
if root.picture.width > 0: Image {
source: root.picture;
width: 14px;
height: 14px;
image-fit: contain;
y: (parent.height - self.height) / 2;
accessible-role: AccessibleRole.none;
}
Text {
text: root.text;
color: root.tint;
@@ -86,6 +96,37 @@ export component Chip inherits Rectangle {
}
}
// Up to three badge pictures in their own colours, 14 px high, after a
// name; empty ones take no room.
export component BadgeIcons inherits HorizontalLayout {
in property <image> first;
in property <image> second;
in property <image> third;
spacing: 2px;
cross-axis-alignment: center;
Image {
source: root.first;
width: root.first.width > 0 ? 14px : 0px;
height: 14px;
image-fit: contain;
accessible-role: AccessibleRole.none;
}
Image {
source: root.second;
width: root.second.width > 0 ? 14px : 0px;
height: 14px;
image-fit: contain;
accessible-role: AccessibleRole.none;
}
Image {
source: root.third;
width: root.third.width > 0 ? 14px : 0px;
height: 14px;
image-fit: contain;
accessible-role: AccessibleRole.none;
}
}
// A coloured dot (online, connection state).
export component Dot inherits Rectangle {
in property <length> size: 8px;
+1 -1
View File
@@ -10,7 +10,7 @@ export { Slider } from "slider.slint";
export { SegmentedTabs, TabItem } from "tabs.slint";
export { Status, Avatar } from "avatar.slint";
export { BannerPicture } from "banner-picture.slint";
export { CountBadge, LiveBadge, Chip, Dot } from "badge.slint";
export { CountBadge, LiveBadge, Chip, BadgeIcons, Dot } from "badge.slint";
export { SectionHeader, Card, Divider, Banner } from "card.slint";
export { Meter, SpeakingBars } from "meter.slint";
export { NavItem, ListItem } from "list-item.slint";