voelin-ui: closer to the mockups in the details; steadier screenshots
The voice channel's buttons now sit beside its title, so the topic and the count below use the whole width, as in the mockup. The stream card's gradient has two stops: the software renderer drew a dotted seam at the middle one. The resize handle is a grip of three dots. Screenshots run with FFmpeg off (probing a hardware encoder crashed the app now and then in this machine's AMF driver, which no picture needs), on a screen twice the window's size so the pointer is not over the window (it made a message show its hover actions), and take extra arguments such as `--set ui.theme=light`. The development switches list the new screens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
92f5cd7c5b
commit
c4caeac168
4 files changed
+57
-36
No files matched your search
@@ -14,7 +14,11 @@
|
||||
//! `server`, `settings[:<section>]` (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:<id>` (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:<home|servers|chat|activity|you>` (phone layout).
|
||||
//! - `VOELIN_AUTOWATCH=1`: watch the first stream that shows up.
|
||||
//! - `VOELIN_AUTOSHARE=test-pattern`: share the test pattern (accepting
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
+8
-1
@@ -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
|
||||
Reference in new issue
Block a user