WIP: voice grid sizing, more sample chat (interrupted by a session limit)

Saved as found when the agent stopped; app.slint still carries a
diagnostic min-width of 1600px that must be reverted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
selikhovandClaude Opus 5.5 committed 2026-10-03 01:42:18 +03:00
1 parent 221315c39b
commit f47d85a85c
4 files changed
+58 -6

No files matched your search

+46 -2
View File
@@ -166,8 +166,8 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running {
other => eprintln!("VOELIN_OPEN: unknown screen {other:?}"),
}
}
// The size set before the window opened can be overruled while it lays
// out, so ask again shortly before the picture is taken.
// A window manager can refuse the size set before the window opened,
// so ask again once it is up (a bare X server ignores both).
let resize = switches.window_size.map(|(w, h)| {
let weak = ui.as_weak();
let timer = slint::Timer::default();
@@ -457,6 +457,50 @@ fn demo_chat(app: &mut App, session: u64) {
true,
Some(1),
),
(
DEMO,
"dex",
5,
"Can somebody look at the wiki page? The old link is dead.".into(),
26,
false,
Vec::new(),
false,
None,
),
(
DEMO,
"Kairo",
3,
"Fixed, it points at the new host now.".into(),
24,
false,
vec![react("👍", 2, false)],
false,
None,
),
(
DEMO,
"Mira",
4,
format!("And the banner I promised: {}", file_link(2, "guild-banner.png", 486_912)),
20,
false,
Vec::new(),
false,
None,
),
(
DEMO,
"Talon",
6,
"That looks great. Putting it on the site tonight.".into(),
17,
false,
vec![react("❤️", 4, true)],
false,
None,
),
(
DEMO,
"Lumen",
+1 -1
View File
@@ -36,7 +36,7 @@ export component MainWindow inherits Window {
title: Bridge.app-name;
preferred-width: 1280px;
preferred-height: 820px;
min-width: 360px;
min-width: 1600px;
min-height: 480px;
background: Theme.bg-app;
default-font-family: "Inter";
+3 -1
View File
@@ -499,6 +499,8 @@ component MessageList inherits VerticalLayout {
}
ListView {
vertical-stretch: 1;
// A long chat must not make the window taller: the list scrolls.
preferred-height: 0px;
accessible-label: @tr("Messages");
for line in root.model: MessageRow {
line: line;
@@ -613,7 +615,7 @@ export component ChatView inherits VerticalLayout {
y: (parent.height - self.height) / 2;
clicked => { Nav.show-topics(!Nav.topics-open); }
}
if Bridge.viewer-open == false && Bridge.streams.length > 0: Button {
if !Bridge.viewer-open && !Nav.right-panel-open && Bridge.streams.length > 0: Button {
small: true;
icon: Icons.monitor-up;
text: @tr("Streams ({})", Bridge.streams.length);
+8 -2
View File
@@ -359,7 +359,7 @@ export component MembersList inherits VerticalLayout {
// One person as a tile of the voice grid.
component VoiceTile inherits Rectangle {
in property <MemberItem> member;
min-height: 150px;
border-radius: Theme.radius-lg;
background: Theme.surface-2;
border-width: member.talking ? 2px : 1px;
@@ -432,7 +432,7 @@ component StreamTile inherits Rectangle {
in property <string> streamer;
in property <string> id;
in property <bool> watching;
min-height: 150px;
border-radius: Theme.radius-lg;
clip: true;
background: @linear-gradient(135deg, #2b1f6e 0%, #0f2a66 100%);
@@ -551,15 +551,21 @@ export component VoiceGrid inherits VerticalLayout {
padding-left: Theme.space-5;
padding-right: Theme.space-5;
spacing: Theme.space-4;
// One cell per column; the last row's empty cells stay blank.
for column in root.columns: Rectangle {
property <int> index: row * root.columns + column;
horizontal-stretch: 1;
// The cell sizes the tile, never the other way round.
min-width: 200px;
height: 176px;
if index < Bridge.members.length: VoiceTile {
width: parent.width;
height: parent.height;
member: Bridge.members[index];
}
if index >= Bridge.members.length && index < root.total: StreamTile {
width: parent.width;
height: parent.height;
name: Bridge.streams[index - Bridge.members.length].name;
streamer: Bridge.streams[index - Bridge.members.length].streamer;
id: Bridge.streams[index - Bridge.members.length].id;