diff --git a/crates/voelin-ui/src/dev.rs b/crates/voelin-ui/src/dev.rs index effbc37..8951e9f 100644 --- a/crates/voelin-ui/src/dev.rs +++ b/crates/voelin-ui/src/dev.rs @@ -14,7 +14,11 @@ //! `server`, `settings[:
]` (voice, keybinds, streaming, privacy, //! appearance, or 0-4), `about`, `share`, `bookmark` (add a server), //! `emoji` (the picker), `client` (the volume dialog of the first other -//! client once connected), `panel` / `no-panel` (the right panel), +//! client once connected), `panel` / `no-panel` (the members panel), +//! `voice` (the voice channel view), `pins`, `topics` (the drawers), +//! `topic:` (a topic's messages), `member` (the member card of the +//! first other client), `watch` (the first stream; with sample data the +//! local test pattern in its place), `popout` (the same, popped out), //! `tab:` (phone layout). //! - `VOELIN_AUTOWATCH=1`: watch the first stream that shows up. //! - `VOELIN_AUTOSHARE=test-pattern`: share the test pattern (accepting diff --git a/crates/voelin-ui/ui/components/overlay.slint b/crates/voelin-ui/ui/components/overlay.slint index b248cd9..9d75603 100644 --- a/crates/voelin-ui/ui/components/overlay.slint +++ b/crates/voelin-ui/ui/components/overlay.slint @@ -286,11 +286,13 @@ export component ResizeHandle inherits Rectangle { accessible-value: round(size / 1px); accessible-action-increment => { size = min(maximum, size + 16px); } accessible-action-decrement => { size = max(minimum, size - 16px); } - Rectangle { - width: 2px; - height: 36px; - border-radius: 1px; - background: touch.has-hover || touch.pressed ? Theme.accent : Theme.border-strong; + // Three dots, as a grip. + for i in 3: Rectangle { + y: (parent.height - 22px) / 2 + i * 9px; + width: 4px; + height: 4px; + border-radius: 2px; + background: touch.has-hover || touch.pressed ? Theme.accent : Theme.text-muted; } // The handle moves with the edge, so each move adds the distance from // where it was pressed. diff --git a/crates/voelin-ui/ui/screens/voice.slint b/crates/voelin-ui/ui/screens/voice.slint index b5a0bb7..981e902 100644 --- a/crates/voelin-ui/ui/screens/voice.slint +++ b/crates/voelin-ui/ui/screens/voice.slint @@ -107,7 +107,8 @@ component StreamCard inherits Rectangle { height: 236px; border-radius: Theme.radius-lg; clip: true; - background: @linear-gradient(160deg, #1b2a6b 0%, #2a1b5e 45%, #0c1430 100%); + // Two stops: the software renderer draws a seam at a middle stop. + background: @linear-gradient(160deg, #26237a 0%, #0c1430 100%); border-width: 1px; border-color: stream.watching ? Theme.accent : Theme.border-strong; accessible-role: AccessibleRole.groupbox; @@ -211,6 +212,8 @@ component StreamCard inherits Rectangle { // The voice channel view (desktop): header, people, streams, chat. export component VoiceView inherits VerticalLayout { + // The title with the buttons beside it; the topic and the count below + // take the whole width. HorizontalLayout { padding-left: Theme.space-7; padding-right: Theme.space-5; @@ -226,12 +229,39 @@ export component VoiceView inherits VerticalLayout { VerticalLayout { horizontal-stretch: 1; spacing: Theme.space-1; - Text { - text: Bridge.own-channel; - color: Theme.text; - font-size: Theme.font-3xl; - font-weight: Theme.weight-semibold; - overflow: elide; + HorizontalLayout { + spacing: Theme.space-3; + Text { + text: Bridge.own-channel; + color: Theme.text; + font-size: Theme.font-3xl; + font-weight: Theme.weight-semibold; + vertical-alignment: center; + horizontal-stretch: 1; + overflow: elide; + } + IconButton { + icon: Icons.message-square; + label: @tr("Chat only"); + y: (parent.height - self.height) / 2; + clicked => { Nav.show-voice(false); } + } + Button { + icon: Icons.settings; + text: @tr("Voice Settings"); + y: (parent.height - self.height) / 2; + clicked => { Nav.open-settings(SettingsSection.voice); } + } + Button { + kind: ButtonKind.danger; + icon: Icons.phone-off; + text: @tr("Leave"); + y: (parent.height - self.height) / 2; + clicked => { + Nav.show-voice(false); + Bridge.disconnect-voice(); + } + } } if Bridge.own-channel-topic != "": Text { text: Bridge.own-channel-topic; @@ -257,28 +287,6 @@ export component VoiceView inherits VerticalLayout { } } } - IconButton { - icon: Icons.message-square; - label: @tr("Chat only"); - y: Theme.space-1; - clicked => { Nav.show-voice(false); } - } - Button { - icon: Icons.settings; - text: @tr("Voice Settings"); - y: Theme.space-1; - clicked => { Nav.open-settings(SettingsSection.voice); } - } - Button { - kind: ButtonKind.danger; - icon: Icons.phone-off; - text: @tr("Leave"); - y: Theme.space-1; - clicked => { - Nav.show-voice(false); - Bridge.disconnect-voice(); - } - } } // The people, centred, wrapping into more rows when there are many. FlexboxLayout { diff --git a/scripts/shots.sh b/scripts/shots.sh index f42da97..3308569 100755 --- a/scripts/shots.sh +++ b/scripts/shots.sh @@ -8,17 +8,24 @@ # # WAYLAND_DISPLAY is removed so the window opens on the Xvfb server and not # on the desktop of a Wayland session (winit prefers Wayland when it can). +# The screen is twice the window's size, so the pointer (in its middle) is +# not over the window and nothing shows as hovered. FFmpeg stays off: the +# pictures need no hardware encoders, and probing them can crash in some +# drivers. Extra arguments (`--set ui.theme=light`) come from $ARGS. set -eu out=$1 open=$2 size=${3:-1440x960} +w=${size%x*} +h=${size#*x} bin=${VOELIN_BIN:-$CARGO_TARGET_DIR/debug/voelin} env -u WAYLAND_DISPLAY \ SLINT_BACKEND=winit-software \ + VOELIN_FFMPEG=0 \ VOELIN_DATA_DIR="$(mktemp -d)" \ VOELIN_DEMO_UI=1 \ VOELIN_OPEN="$open" \ VOELIN_WINDOW_SIZE="$size" \ VOELIN_SCREENSHOT="$out" \ VOELIN_SCREENSHOT_DELAY="${DELAY:-4}" \ - xvfb-run -a -s "-screen 0 ${size}x24" "$bin" >/dev/null 2>&1 + xvfb-run -a -s "-screen 0 $((w * 2))x$((h * 2))x24" "$bin" ${ARGS:-} >/dev/null 2>&1