diff --git a/crates/voelin-ui/src/dev.rs b/crates/voelin-ui/src/dev.rs index 67857e4..6847cbc 100644 --- a/crates/voelin-ui/src/dev.rs +++ b/crates/voelin-ui/src/dev.rs @@ -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", diff --git a/crates/voelin-ui/ui/app.slint b/crates/voelin-ui/ui/app.slint index 3b94cdb..52cb5d7 100644 --- a/crates/voelin-ui/ui/app.slint +++ b/crates/voelin-ui/ui/app.slint @@ -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"; diff --git a/crates/voelin-ui/ui/screens/chat.slint b/crates/voelin-ui/ui/screens/chat.slint index 1feb4aa..994e582 100644 --- a/crates/voelin-ui/ui/screens/chat.slint +++ b/crates/voelin-ui/ui/screens/chat.slint @@ -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); diff --git a/crates/voelin-ui/ui/screens/members.slint b/crates/voelin-ui/ui/screens/members.slint index 9d0c4cb..1fa85da 100644 --- a/crates/voelin-ui/ui/screens/members.slint +++ b/crates/voelin-ui/ui/screens/members.slint @@ -359,7 +359,7 @@ export component MembersList inherits VerticalLayout { // One person as a tile of the voice grid. component VoiceTile inherits Rectangle { in property 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 streamer; in property id; in property 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 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;