From 3c47bc682ff7253d9ccac330fa9a5ff9cd33a099 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 6 Oct 2026 06:36:32 +0000 Subject: [PATCH] ui: a clearer edge on pop-ups, and a light scrim behind them Pop-ups, menus and tooltips had the border-strong edge, which barely shows against the panels under them. They get a new border-popup token; the Select and Stream Studio drop-downs too, being the same kind of menu. The member card, the emoji picker and the bell's panel now dim the window behind them with a new scrim-light, lighter than the modals' scrim; a click on it still closes them. The toast moves above them, so that scrim does not dim it (a poke from the member card is confirmed there). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ --- CHANGELOG.md | 2 ++ crates/voelin-ui/ui/app.slint | 31 ++++++++++++------- crates/voelin-ui/ui/components/emoji.slint | 2 +- crates/voelin-ui/ui/components/overlay.slint | 2 +- crates/voelin-ui/ui/components/select.slint | 2 +- crates/voelin-ui/ui/components/tooltip.slint | 2 +- crates/voelin-ui/ui/screens/members.slint | 2 +- crates/voelin-ui/ui/screens/overlays.slint | 2 +- .../voelin-ui/ui/screens/studio-parts.slint | 2 +- crates/voelin-ui/ui/theme.slint | 5 +++ docs/ui.md | 4 +-- 11 files changed, 35 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb0ea18..705a80c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,8 @@ User-visible changes of the apps and the `tsgw` gateway. The format follows - A server's published gateway replaces one stored before (found or typed into an older version), so a gateway that moved is followed. - zbus's warnings about desktop portal requests are left out of the logs. +- Pop-ups, menus and tooltips have a clearer edge, and the member card, the + emoji picker and the notifications panel dim the window behind them. ### Fixed diff --git a/crates/voelin-ui/ui/app.slint b/crates/voelin-ui/ui/app.slint index 858d27b..4303cc1 100644 --- a/crates/voelin-ui/ui/app.slint +++ b/crates/voelin-ui/ui/app.slint @@ -287,19 +287,11 @@ export component MainWindow inherits Window { } } - toast := Toast { - x: (parent.width - self.width) / 2; - y: parent.height - self.height - (Nav.narrow ? 140px : 96px); - text: Bridge.status-text; - visible: self.shown && !Bridge.myts.prompt; - // A notice from the start (an imported identity) waits for the - // account prompt to close. - paused: Bridge.myts.prompt; - widest: min(560px, parent.width - 32px); - } - - // The member card of the members panel, over everything. + // The member card of the members panel, over everything. Like the emoji + // picker and the bell's panel below, it dims the window a little, and a + // click outside it closes it. if !Bridge.myts.prompt && (Bridge.member-card.open): Rectangle { + background: Theme.scrim-light; TouchArea { clicked => { Bridge.open-member(-1); } } @@ -310,6 +302,7 @@ export component MainWindow inherits Window { } if !Bridge.myts.prompt && (Nav.emoji-open): Rectangle { + background: Theme.scrim-light; // Clicks outside the picker close it. TouchArea { clicked => { Nav.emoji-open = false; } @@ -336,6 +329,7 @@ export component MainWindow inherits Window { // The bell's panel, under the bell (the phone: the whole width). if !Bridge.myts.prompt && (Nav.notifications-open): Rectangle { + background: Theme.scrim-light; TouchArea { clicked => { Nav.notifications-open = false; } } @@ -347,6 +341,19 @@ export component MainWindow inherits Window { } } + // Over the pop-ups, so their scrim does not dim it (a poke from the + // member card says so here); under the dialogs. + toast := Toast { + x: (parent.width - self.width) / 2; + y: parent.height - self.height - (Nav.narrow ? 140px : 96px); + text: Bridge.status-text; + visible: self.shown && !Bridge.myts.prompt; + // A notice from the start (an imported identity) waits for the + // account prompt to close. + paused: Bridge.myts.prompt; + widest: min(560px, parent.width - 32px); + } + if !Bridge.myts.prompt && (Nav.search-open): SearchPalette { } if !Bridge.myts.prompt && (Nav.lightbox-open): Lightbox { } diff --git a/crates/voelin-ui/ui/components/emoji.slint b/crates/voelin-ui/ui/components/emoji.slint index 39c3b30..7c54b8a 100644 --- a/crates/voelin-ui/ui/components/emoji.slint +++ b/crates/voelin-ui/ui/components/emoji.slint @@ -82,7 +82,7 @@ export component EmojiPicker inherits Rectangle { border-radius: Theme.radius-lg; background: Theme.surface; border-width: 1px; - border-color: Theme.border-strong; + border-color: Theme.border-popup; accessible-role: AccessibleRole.groupbox; accessible-label: @tr("Emoji"); FocusScope { diff --git a/crates/voelin-ui/ui/components/overlay.slint b/crates/voelin-ui/ui/components/overlay.slint index 7fad49a..5b18897 100644 --- a/crates/voelin-ui/ui/components/overlay.slint +++ b/crates/voelin-ui/ui/components/overlay.slint @@ -47,7 +47,7 @@ export component PopupMenu inherits Rectangle { border-radius: Theme.radius-md; background: Theme.surface-3; border-width: 1px; - border-color: Theme.border-strong; + border-color: Theme.border-popup; accessible-role: AccessibleRole.list; VerticalLayout { padding: Theme.space-2; diff --git a/crates/voelin-ui/ui/components/select.slint b/crates/voelin-ui/ui/components/select.slint index 1449fb9..750b194 100644 --- a/crates/voelin-ui/ui/components/select.slint +++ b/crates/voelin-ui/ui/components/select.slint @@ -124,7 +124,7 @@ export component Select inherits Rectangle { border-radius: Theme.radius-md; background: Theme.surface-3; border-width: 1px; - border-color: Theme.border-strong; + border-color: Theme.border-popup; clip: true; ScrollView { VerticalLayout { diff --git a/crates/voelin-ui/ui/components/tooltip.slint b/crates/voelin-ui/ui/components/tooltip.slint index c6e2484..67fb2bb 100644 --- a/crates/voelin-ui/ui/components/tooltip.slint +++ b/crates/voelin-ui/ui/components/tooltip.slint @@ -18,7 +18,7 @@ export component TooltipBubble inherits Rectangle { border-radius: Theme.radius-xs; background: Theme.surface-4; border-width: 1px; - border-color: Theme.border-strong; + border-color: Theme.border-popup; HorizontalLayout { padding-left: Theme.space-3; padding-right: Theme.space-3; diff --git a/crates/voelin-ui/ui/screens/members.slint b/crates/voelin-ui/ui/screens/members.slint index de20514..b494cf5 100644 --- a/crates/voelin-ui/ui/screens/members.slint +++ b/crates/voelin-ui/ui/screens/members.slint @@ -187,7 +187,7 @@ export component MemberCardPopup inherits Rectangle { background: Theme.surface-3; border-radius: Theme.radius-lg; border-width: 1px; - border-color: Theme.border-strong; + border-color: Theme.border-popup; accessible-role: AccessibleRole.groupbox; accessible-label: Bridge.member-card.name; // Clicks inside stay inside. diff --git a/crates/voelin-ui/ui/screens/overlays.slint b/crates/voelin-ui/ui/screens/overlays.slint index 10c3d5c..17340e4 100644 --- a/crates/voelin-ui/ui/screens/overlays.slint +++ b/crates/voelin-ui/ui/screens/overlays.slint @@ -106,7 +106,7 @@ export component NotificationsPanel inherits Rectangle { background: Theme.surface-3; border-radius: Theme.radius-lg; border-width: 1px; - border-color: Theme.border-strong; + border-color: Theme.border-popup; clip: true; accessible-role: AccessibleRole.groupbox; accessible-label: @tr("Notifications"); diff --git a/crates/voelin-ui/ui/screens/studio-parts.slint b/crates/voelin-ui/ui/screens/studio-parts.slint index 9798240..819438d 100644 --- a/crates/voelin-ui/ui/screens/studio-parts.slint +++ b/crates/voelin-ui/ui/screens/studio-parts.slint @@ -1147,7 +1147,7 @@ export component DestinationSelect inherits Rectangle { border-radius: Theme.radius-md; background: Theme.surface-3; border-width: 1px; - border-color: Theme.border-strong; + border-color: Theme.border-popup; VerticalLayout { padding: Theme.space-2; for item[i] in StudioBridge.destinations: Rectangle { diff --git a/crates/voelin-ui/ui/theme.slint b/crates/voelin-ui/ui/theme.slint index e9fc528..c7a67f5 100644 --- a/crates/voelin-ui/ui/theme.slint +++ b/crates/voelin-ui/ui/theme.slint @@ -39,11 +39,16 @@ export global Theme { out property surface-4: dark ? #1c2b5c : #dce5f7; // Dimmed backdrop behind modals. out property scrim: dark ? #02050fc0 : #0b132b80; + // A lighter dim behind pop-ups: the member card, emoji picker, bell. + out property scrim-light: dark ? #02050f73 : #0b132b33; // Translucent bar over video. out property overlay: dark ? #060a18c8 : #0b1330b0; out property border: dark ? #1b2750 : #d3dcee; out property border-strong: dark ? #2a3a6e : #b9c6e2; + // The edge of pop-ups, menus and tooltips, which lie over surfaces of + // about their own colour. + out property border-popup: dark ? #3d5296 : #9fb0d4; // Accent (buttons, selection, links). out property accent: dark ? #2d6bff : #2458e6; diff --git a/docs/ui.md b/docs/ui.md index 19699e1..d54a30d 100644 --- a/docs/ui.md +++ b/docs/ui.md @@ -64,8 +64,8 @@ literal colours. | Group | Tokens | |---|---| | Mode | `mode` ("dark", "light", "system"; set from `ui.theme`), `dark` (resolved), `font-scale` (from `ui.font_scale`) | -| Backgrounds | `bg-app`, `backdrop` (gradient), `bg-rail`, `surface` (panels), `surface-2` (cards, inputs), `surface-3` (hover, menus), `surface-4` (pressed), `scrim`, `overlay` | -| Lines | `border`, `border-strong`, `glow`, `glow-width` (focus/selection ring; the software renderer draws no shadows) | +| Backgrounds | `bg-app`, `backdrop` (gradient), `bg-rail`, `surface` (panels), `surface-2` (cards, inputs), `surface-3` (hover, menus), `surface-4` (pressed), `scrim` (behind modals), `scrim-light` (behind pop-ups), `overlay` | +| Lines | `border`, `border-strong`, `border-popup` (pop-ups, menus, tooltips), `glow`, `glow-width` (focus/selection ring; the software renderer draws no shadows) | | Accent | `accent`, `accent-hover`, `accent-pressed`, `accent-soft` (selected rows), `accent-soft-hover`, `accent-text` (links), `name-text` (chat authors), `on-accent` | | States | `live`, `live-soft`, `danger`, `danger-soft`, `success`, `success-soft`, `warning`, `warning-soft`, `idle`, `dnd`, `offline`, `gold` (crown), `info` | | Text | `text`, `text-secondary`, `text-muted`, `text-disabled`, `icon` |