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:
1 parent
cff0d73c99
commit
49d656ead0
4 files changed
+58
-6
No files matched your search
@@ -166,8 +166,8 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running {
|
|||||||
other => eprintln!("VOELIN_OPEN: unknown screen {other:?}"),
|
other => eprintln!("VOELIN_OPEN: unknown screen {other:?}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// The size set before the window opened can be overruled while it lays
|
// A window manager can refuse the size set before the window opened,
|
||||||
// out, so ask again shortly before the picture is taken.
|
// so ask again once it is up (a bare X server ignores both).
|
||||||
let resize = switches.window_size.map(|(w, h)| {
|
let resize = switches.window_size.map(|(w, h)| {
|
||||||
let weak = ui.as_weak();
|
let weak = ui.as_weak();
|
||||||
let timer = slint::Timer::default();
|
let timer = slint::Timer::default();
|
||||||
@@ -457,6 +457,50 @@ fn demo_chat(app: &mut App, session: u64) {
|
|||||||
true,
|
true,
|
||||||
Some(1),
|
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,
|
DEMO,
|
||||||
"Lumen",
|
"Lumen",
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export component MainWindow inherits Window {
|
|||||||
title: Bridge.app-name;
|
title: Bridge.app-name;
|
||||||
preferred-width: 1280px;
|
preferred-width: 1280px;
|
||||||
preferred-height: 820px;
|
preferred-height: 820px;
|
||||||
min-width: 360px;
|
min-width: 1600px;
|
||||||
min-height: 480px;
|
min-height: 480px;
|
||||||
background: Theme.bg-app;
|
background: Theme.bg-app;
|
||||||
default-font-family: "Inter";
|
default-font-family: "Inter";
|
||||||
|
|||||||
@@ -499,6 +499,8 @@ component MessageList inherits VerticalLayout {
|
|||||||
}
|
}
|
||||||
ListView {
|
ListView {
|
||||||
vertical-stretch: 1;
|
vertical-stretch: 1;
|
||||||
|
// A long chat must not make the window taller: the list scrolls.
|
||||||
|
preferred-height: 0px;
|
||||||
accessible-label: @tr("Messages");
|
accessible-label: @tr("Messages");
|
||||||
for line in root.model: MessageRow {
|
for line in root.model: MessageRow {
|
||||||
line: line;
|
line: line;
|
||||||
@@ -613,7 +615,7 @@ export component ChatView inherits VerticalLayout {
|
|||||||
y: (parent.height - self.height) / 2;
|
y: (parent.height - self.height) / 2;
|
||||||
clicked => { Nav.show-topics(!Nav.topics-open); }
|
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;
|
small: true;
|
||||||
icon: Icons.monitor-up;
|
icon: Icons.monitor-up;
|
||||||
text: @tr("Streams ({})", Bridge.streams.length);
|
text: @tr("Streams ({})", Bridge.streams.length);
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ export component MembersList inherits VerticalLayout {
|
|||||||
// One person as a tile of the voice grid.
|
// One person as a tile of the voice grid.
|
||||||
component VoiceTile inherits Rectangle {
|
component VoiceTile inherits Rectangle {
|
||||||
in property <MemberItem> member;
|
in property <MemberItem> member;
|
||||||
min-height: 150px;
|
|
||||||
border-radius: Theme.radius-lg;
|
border-radius: Theme.radius-lg;
|
||||||
background: Theme.surface-2;
|
background: Theme.surface-2;
|
||||||
border-width: member.talking ? 2px : 1px;
|
border-width: member.talking ? 2px : 1px;
|
||||||
@@ -432,7 +432,7 @@ component StreamTile inherits Rectangle {
|
|||||||
in property <string> streamer;
|
in property <string> streamer;
|
||||||
in property <string> id;
|
in property <string> id;
|
||||||
in property <bool> watching;
|
in property <bool> watching;
|
||||||
min-height: 150px;
|
|
||||||
border-radius: Theme.radius-lg;
|
border-radius: Theme.radius-lg;
|
||||||
clip: true;
|
clip: true;
|
||||||
background: @linear-gradient(135deg, #2b1f6e 0%, #0f2a66 100%);
|
background: @linear-gradient(135deg, #2b1f6e 0%, #0f2a66 100%);
|
||||||
@@ -551,15 +551,21 @@ export component VoiceGrid inherits VerticalLayout {
|
|||||||
padding-left: Theme.space-5;
|
padding-left: Theme.space-5;
|
||||||
padding-right: Theme.space-5;
|
padding-right: Theme.space-5;
|
||||||
spacing: Theme.space-4;
|
spacing: Theme.space-4;
|
||||||
|
// One cell per column; the last row's empty cells stay blank.
|
||||||
for column in root.columns: Rectangle {
|
for column in root.columns: Rectangle {
|
||||||
property <int> index: row * root.columns + column;
|
property <int> index: row * root.columns + column;
|
||||||
horizontal-stretch: 1;
|
horizontal-stretch: 1;
|
||||||
|
// The cell sizes the tile, never the other way round.
|
||||||
|
min-width: 200px;
|
||||||
|
height: 176px;
|
||||||
if index < Bridge.members.length: VoiceTile {
|
if index < Bridge.members.length: VoiceTile {
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
|
height: parent.height;
|
||||||
member: Bridge.members[index];
|
member: Bridge.members[index];
|
||||||
}
|
}
|
||||||
if index >= Bridge.members.length && index < root.total: StreamTile {
|
if index >= Bridge.members.length && index < root.total: StreamTile {
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
|
height: parent.height;
|
||||||
name: Bridge.streams[index - Bridge.members.length].name;
|
name: Bridge.streams[index - Bridge.members.length].name;
|
||||||
streamer: Bridge.streams[index - Bridge.members.length].streamer;
|
streamer: Bridge.streams[index - Bridge.members.length].streamer;
|
||||||
id: Bridge.streams[index - Bridge.members.length].id;
|
id: Bridge.streams[index - Bridge.members.length].id;
|
||||||
|
|||||||
Reference in new issue
Block a user