From 318871033f1e91141985eba9db265104820d431b Mon Sep 17 00:00:00 2001 From: gramps Date: Fri, 30 Oct 2026 11:07:51 -0700 Subject: [PATCH] feat(ui): the capture context menu is always available (Ctrl+right-click); wordmark "ty" is YouTube red MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. The preview's right-click handler swallowed every right-click for the zoom box, so the element/backdrop context menu could not open at all. Sources and capture windows must be changeable AT ANY TIME — a creator swaps a window mid-stream without entering edit mode. Ctrl + right-click now bypasses the zoom path and lets WPF open the menu under the cursor; plain right-click keeps the zoom box. No menu markup changed. 2. The wordmark's "ty" is YouTube red (#ff0000), permanently. The token sweep had recoloured it to the interactive blue because it was a bare literal; DESIGN.md now records "never re-colour the wordmark" beside the token, and UiShellTests pins it. Guard: UiShellTests gains the wordmark rule and the Ctrl+right-click chord. --- Controls/PreviewPane.xaml.cs | 6 ++++++ Controls/TopBar.xaml | 4 +++- DESIGN.md | 2 +- ytLive.Tests/UiShellTests.cs | 13 +++++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Controls/PreviewPane.xaml.cs b/Controls/PreviewPane.xaml.cs index cc6b652..1e0dc94 100644 --- a/Controls/PreviewPane.xaml.cs +++ b/Controls/PreviewPane.xaml.cs @@ -590,6 +590,12 @@ public partial class PreviewPane : UserControl private void Preview_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { + // Ctrl + right-click opens the element / backdrop context menu — sources and windows can + // be changed at ANY time, live or not (creator ruling 2026-10-30). Plain right-click stays + // with the zoom box, which is why the menu needed its own chord. + // Returning without Handled lets WPF's ContextMenuService open the menu under the cursor. + if ((Keyboard.Modifiers & ModifierKeys.Control) != 0) return; + var vm = DataContext as MainViewModel; if (vm == null) return; var grid = (Grid)sender; diff --git a/Controls/TopBar.xaml b/Controls/TopBar.xaml index 93b13f8..4159e5b 100644 --- a/Controls/TopBar.xaml +++ b/Controls/TopBar.xaml @@ -23,7 +23,9 @@ - + diff --git a/DESIGN.md b/DESIGN.md index ceb6ee9..231cd90 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -58,7 +58,7 @@ | `success-container` | `#1d5c38` | Success notice surface (success toast) | | `warning-container` | `#b8860b` | Warning surface — health banner, warning toast | | `test-container` | `#9c6f1c` | Test-stream chrome: the gold top bar and glow | -| `youtube` | `#ff0000` | **YouTube-branded surfaces only** — the Stream Info and YPP rails, the YouTube account row. Not for state: live stays `primary` | +| `youtube` | `#ff0000` | **YouTube-branded surfaces only** — Stream Info / YPP rails, the YouTube account row, and the wordmark's "ty" (creator ruling: never re-colour it) | — the Stream Info and YPP rails, the YouTube account row. Not for state: live stays `primary` | **The rule:** red means "live or recording" and nothing else. Never a Send button, a delete action, a brand flourish, or a general accent — that was the defect in the first Stitch draft. diff --git a/ytLive.Tests/UiShellTests.cs b/ytLive.Tests/UiShellTests.cs index cb1212e..3d0a25e 100644 --- a/ytLive.Tests/UiShellTests.cs +++ b/ytLive.Tests/UiShellTests.cs @@ -59,6 +59,19 @@ public class UiShellTests Assert.DoesNotContain("MaxHeight", listLine); } + [Fact] + public void The_wordmark_ty_stays_youtube_red_and_ctrl_opens_the_context_menu() + { + var topBar = SourceAssert.Text("Controls", "TopBar.xaml"); + Assert.Contains("", topBar); + + // Plain right-click is the zoom box; the context menu moved to Ctrl+right-click so a + // creator can change capture sources mid-stream. + var preview = SourceAssert.Text("Controls", "PreviewPane.xaml.cs"); + Assert.Contains("ModifierKeys.Control", preview); + Assert.Contains("return;", preview); + } + private static int Count(string haystack, string needle) { var hits = 0;