Files
VoelinClient/crates/voelin-ui/ui/studio-window.slint
T
selikhovandClaude Opus 5.5 e1400cbeee voelin-ui: bring the studio screens closer to the design
Seen next to the mockups: the preview's corner badges sat at the left
(a positioned layout takes its parent's width unless told otherwise), the
bottom bar cut "Share Window" short, the mixer and the chat took the
height the preview needed, the destination was one line where the design
shows the channel over the server, and the compact stream settings
spread over their panel. The preview's panel is now as tall as a 16:9
picture across its column, the badges keep to their corners, the chat
shows its newest lines, the destination is channel and server, and a
scene's summary names its main picture first.

The overlay sources start clear of the corners the studio's own badges
cover in the preview: the viewer count at the top right, what is on
above the bottom left. While live, Go Live stays bright instead of
looking unavailable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 07:35:38 +03:00

140 lines
5.2 KiB
Plaintext

// The Stream Studio in a window of its own, while the main window goes on.
// Same pieces as the integrated studio (screens/studio-parts.slint), more
// compact; it has its own globals, which Rust fills from the same models
// (src/studio.rs). Closing it docks the studio back into the main window.
import { Theme } from "theme.slint";
import { Icons } from "icons.slint";
import { StudioBridge, StudioNav } from "studio-bridge.slint";
import { IconButton, ScrollView } from "components/index.slint";
import { ScenesCard, SourcesCard, StudioPanel, PanelTitle, StudioPreview, MixerCard, StreamSettings, StudioActions, ViewerRequests, StudioDialogs } from "screens/studio-parts.slint";
export component StudioWindow inherits Window {
title: @tr("Stream Studio");
preferred-width: 900px;
preferred-height: 720px;
min-width: 640px;
min-height: 480px;
background: Theme.bg-app;
default-font-family: "Inter";
default-font-size: Theme.font-body;
icon: Icons.logo;
Rectangle {
background: Theme.backdrop;
VerticalLayout {
padding: Theme.space-3;
padding-top: 0;
spacing: Theme.space-3;
// The app and what this is, and back into the main window.
HorizontalLayout {
height: 52px;
spacing: Theme.space-3;
padding-left: Theme.space-2;
Image {
width: 28px;
height: 28px;
y: (parent.height - self.height) / 2;
source: Icons.logo;
}
Text {
text: "Voelin";
color: Theme.text;
font-size: Theme.font-xl;
font-weight: Theme.weight-semibold;
vertical-alignment: center;
}
Text {
text: @tr("Stream Studio");
color: Theme.accent-text;
font-size: Theme.font-md;
vertical-alignment: center;
horizontal-stretch: 1;
}
IconButton {
icon: Icons.minimize-2;
label: @tr("Back into the main window");
y: (parent.height - self.height) / 2;
clicked => { StudioBridge.dock(); }
}
}
HorizontalLayout {
vertical-stretch: 1;
spacing: Theme.space-3;
VerticalLayout {
width: 216px * max(1.0, Theme.font-scale);
spacing: Theme.space-3;
ScenesCard {
compact: true;
vertical-stretch: 1;
}
SourcesCard {
compact: true;
vertical-stretch: 1;
}
}
VerticalLayout {
horizontal-stretch: 1;
spacing: Theme.space-3;
StudioPanel {
vertical-stretch: 1.2;
min-height: 200px;
VerticalLayout {
padding: Theme.space-3;
spacing: Theme.space-2;
PanelTitle {
text: @tr("Stream Preview");
compact: true;
}
if StudioBridge.viewers.length > 0: ViewerRequests { }
StudioPreview {
vertical-stretch: 1;
large: false;
caption: false;
controls: true;
}
}
}
HorizontalLayout {
vertical-stretch: 1;
min-height: 200px;
spacing: Theme.space-3;
MixerCard {
compact: true;
horizontal-stretch: 1.15;
}
StudioPanel {
horizontal-stretch: 1;
ScrollView {
StreamSettings {
compact: true;
}
}
}
}
}
}
HorizontalLayout {
height: 52px;
spacing: Theme.space-3;
StudioActions {
compact: true;
horizontal-stretch: 1;
}
IconButton {
icon: Icons.settings;
label: @tr("Studio Settings");
filled: true;
size: 44px;
y: (parent.height - self.height) / 2;
clicked => { StudioNav.open-settings(); }
}
}
}
}
StudioDialogs {
width: parent.width;
height: parent.height;
}
}