Document the public functions, constants and types of voelin-ui-vm that had no docs

The items moved from a private module of voelin-ui, where they needed none;
as public API of the new crate they get a line each. The fields of the bridge
structs, which mirror bridge.slint field by field (module docs), and a few
self-describing fields and variants are left as they are.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-20 20:40:51 +03:00
1 parent 668c1a8038
commit 5d66be43d4
5 files changed
+29

No files matched your search

+5
View File
@@ -39,6 +39,7 @@ fn summary(scene: &Scene) -> String {
if names.is_empty() { "Empty".into() } else { names.join(" + ") }
}
/// The kind of a background by name: keep, blur, image or colour.
pub fn background_name(background: &Background) -> &'static str {
match background {
Background::Keep => "keep",
@@ -262,6 +263,7 @@ pub fn parse_colour(text: &str) -> Option<Colour> {
Some(Colour::rgba(byte(0)?, byte(2)?, byte(4)?, a))
}
/// A colour as `#rrggbb`, or `#rrggbbaa` when it is not opaque.
pub fn colour_text(c: Colour) -> String {
if c.a == 255 {
format!("#{:02x}{:02x}{:02x}", c.r, c.g, c.b)
@@ -504,8 +506,11 @@ pub struct Overlay {
pub text: Option<String>,
}
/// The overlay source that shows how many are watching.
pub const OVERLAY_VIEWERS: &str = "Viewer count";
/// The overlay source that shows the stream chat's last lines.
pub const OVERLAY_CHAT: &str = "Chat overlay";
/// The overlay source that names what plays.
pub const OVERLAY_NOW_PLAYING: &str = "Now playing";
fn overlay_kind(name: &str, text: &str) -> SourceKind {