diff --git a/crates/voelin-ui/src/app.rs b/crates/voelin-ui/src/app.rs index 93b3c65..18eff60 100644 --- a/crates/voelin-ui/src/app.rs +++ b/crates/voelin-ui/src/app.rs @@ -602,6 +602,9 @@ impl App { self.refresh_tree(); self.refresh_streams(); self.autoshare(); + if self.open_client_pending && self.current == Some(id) { + self.open_first_client(); + } } Event::ServerInfo { session, name, flavor, capabilities } => { self.sessions.entry(session as i64).or_default().capabilities = capabilities; diff --git a/crates/voelin-ui/ui/screens/home.slint b/crates/voelin-ui/ui/screens/home.slint index abfb04b..0c957a5 100644 --- a/crates/voelin-ui/ui/screens/home.slint +++ b/crates/voelin-ui/ui/screens/home.slint @@ -55,7 +55,7 @@ component ServerCard inherits Rectangle { min-width: 220px; max-width: 340px; horizontal-stretch: 1; - height: 176px; + height: 132px; border-radius: Theme.radius-lg; clip: true; background: Theme.surface-2; @@ -98,6 +98,7 @@ component ServerCard inherits Rectangle { CountBadge { count: root.server.unread; } } } + Rectangle { vertical-stretch: 1; } Text { text: root.server.name; color: Theme.text; @@ -125,14 +126,15 @@ component ServerCard inherits Rectangle { } export component HomePage inherits Rectangle { - ScrollView { + sv := ScrollView { VerticalLayout { + width: sv.visible-width; padding: Theme.space-6; spacing: Theme.space-6; alignment: start; // Welcome banner. Rectangle { - height: 220px; + min-height: 220px; border-radius: Theme.radius-xl; clip: true; background: @linear-gradient(115deg, #0e1d5c 0%, #1c1470 45%, #3a1f86 75%, #0b2a6b 100%); @@ -152,6 +154,8 @@ export component HomePage inherits Rectangle { height: ring.size; border-radius: ring.size / 2; background: ring.color; + // Behind the text in narrow windows. + visible: parent.width > 640px; } for star[i] in [ { x: 0.55, y: 0.18 }, { x: 0.62, y: 0.52 }, { x: 0.71, y: 0.1 }, { x: 0.9, y: 0.3 }, @@ -189,10 +193,12 @@ export component HomePage inherits Rectangle { color: #ffffff; font-size: Theme.font-xl; font-weight: Theme.weight-medium; + wrap: word-wrap; } Text { text: @tr("Talk. Watch. Share. Or look in without joining."); color: #c9d4ff; + wrap: word-wrap; } HorizontalLayout { alignment: start; diff --git a/crates/voelin-ui/ui/screens/mobile.slint b/crates/voelin-ui/ui/screens/mobile.slint index 15b4326..277c2eb 100644 --- a/crates/voelin-ui/ui/screens/mobile.slint +++ b/crates/voelin-ui/ui/screens/mobile.slint @@ -114,6 +114,7 @@ export component ActivityPage inherits VerticalLayout { // Profile, voice controls, settings and About. export component YouPage inherits ScrollView { VerticalLayout { + width: root.visible-width; padding: Theme.space-4; spacing: Theme.space-4; alignment: start; diff --git a/crates/voelin-ui/ui/screens/settings.slint b/crates/voelin-ui/ui/screens/settings.slint index 860af67..e92bf90 100644 --- a/crates/voelin-ui/ui/screens/settings.slint +++ b/crates/voelin-ui/ui/screens/settings.slint @@ -468,8 +468,9 @@ export component SettingsPage inherits Rectangle { : Nav.settings-section == SettingsSection.privacy ? @tr("What the app keeps on this device.") : @tr("Theme, text size and layout. Changes apply at once."); accessible-role: AccessibleRole.groupbox; accessible-label: section-title; - ScrollView { + sv := ScrollView { VerticalLayout { + width: sv.visible-width; padding: compact ? Theme.space-4 : Theme.space-7; spacing: Theme.space-5; alignment: start; diff --git a/crates/voelin-ui/ui/screens/streams.slint b/crates/voelin-ui/ui/screens/streams.slint index 8629cad..c8307a1 100644 --- a/crates/voelin-ui/ui/screens/streams.slint +++ b/crates/voelin-ui/ui/screens/streams.slint @@ -193,9 +193,10 @@ export component StreamsPanel inherits VerticalLayout { font-size: Theme.font-sm; wrap: word-wrap; } - ScrollView { + sv := ScrollView { vertical-stretch: 1; VerticalLayout { + width: sv.visible-width; spacing: Theme.space-2; alignment: start; for member in Bridge.members: MemberRow { diff --git a/crates/voelin-ui/ui/theme.slint b/crates/voelin-ui/ui/theme.slint index 5f2a372..854a51d 100644 --- a/crates/voelin-ui/ui/theme.slint +++ b/crates/voelin-ui/ui/theme.slint @@ -133,7 +133,7 @@ export global Theme { // Shell dimensions. out property rail-width: 72px; - out property sidebar-width: 264px; + out property sidebar-width: 264px * max(1.0, font-scale); out property topbar-height: 56px; out property right-panel-min: 220px; out property right-panel-max: 420px;