From a35ec0c5f832a4289e052ec88f32e6eceb96d5cd Mon Sep 17 00:00:00 2001 From: gramps Date: Sun, 1 Nov 2026 09:16:27 -0800 Subject: [PATCH] =?UTF-8?q?refactor(settings):=20a=20pull-out=20drawer,=20?= =?UTF-8?q?with=20Zoom=20as=20a=20category=20=E2=80=94=20and=20the=20menu?= =?UTF-8?q?=20moves=20to=20the=20wordmark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Creator directive, 2026-11-01. Settings stopped being a centred modal. - **Drawer** (Controls/SettingsDrawer): hosted in PreviewPane's pull-out stack, 320px, the same animated-width pattern as Stream Settings / YPP / Socials / TEST, opened by the gear rail tab on a single left click. SettingsDrawerOpen is exclusive with the other four, both directions. This also removes the modal's MaxHeight-700 scroll problem for good: the drawer is the height of the preview. - **Categories**: headings with controls indented beneath them. Zoom now owns *Zoom view shape* (Circle / Phone / Tablet) and *Zoom box follows*; Recordings, Brand logo and Scene transition are their own categories. - **The app menu moved to the LlamaCasty wordmark** (right-click → Report Bug / Feature Request / About). Left-click still opens About. The gear tab no longer carries a menu at all, so clicking it does exactly one thing. OverlayHost keeps only the Bug / Feature / About panels; its brand-logo handlers and the dev-panel injection moved with the settings block. BrandLogoPreviewTests follows the control (same assertions, new path). Release 0 warnings; 15 tests pass across brand logo, zoom, entitlement and preview history. --- Controls/OverlayHost.xaml | 100 ------------------------- Controls/OverlayHost.xaml.cs | 36 --------- Controls/PreviewPane.xaml | 84 ++++++++++++++++----- Controls/PreviewPane.xaml.cs | 17 +---- Controls/SettingsDrawer.xaml | 104 ++++++++++++++++++++++++++ Controls/SettingsDrawer.xaml.cs | 58 ++++++++++++++ Controls/TopBar.xaml | 17 ++++- Controls/TopBar.xaml.cs | 14 ++++ ViewModels/MainViewModel.Settings.cs | 42 +++++++++++ ViewModels/MainViewModel.Socials.cs | 1 + ViewModels/MainViewModel.Ypp.cs | 3 + ViewModels/MainViewModel.cs | 2 +- docs/ai/ui-surface.md | 1 + ytLive.Tests/BrandLogoPreviewTests.cs | 4 +- 14 files changed, 310 insertions(+), 173 deletions(-) create mode 100644 Controls/SettingsDrawer.xaml create mode 100644 Controls/SettingsDrawer.xaml.cs create mode 100644 ViewModels/MainViewModel.Settings.cs diff --git a/Controls/OverlayHost.xaml b/Controls/OverlayHost.xaml index 604a23d..762fc51 100644 --- a/Controls/OverlayHost.xaml +++ b/Controls/OverlayHost.xaml @@ -35,106 +35,6 @@ - - - - - - - - + + + + - + - - - - - - - - - + ToolTip="Settings" + MouseLeftButtonUp="SettingsTab_Click"> diff --git a/Controls/PreviewPane.xaml.cs b/Controls/PreviewPane.xaml.cs index ad53974..a8a480c 100644 --- a/Controls/PreviewPane.xaml.cs +++ b/Controls/PreviewPane.xaml.cs @@ -730,22 +730,11 @@ public partial class PreviewPane : UserControl } } - /// Rail settings tab (creator ruling 2026-11-01): left-click opens the same app menu - /// the top-bar gear used to own, so Bug / Feature / About keep their only entry point. + /// Rail settings tab (creator ruling 2026-11-01): a left click opens the Settings + /// DRAWER immediately, exactly like the other rail tabs — no menu, no modal. private void SettingsTab_Click(object sender, MouseButtonEventArgs e) { - if (sender is not FrameworkElement { ContextMenu: { } menu } anchor) return; - menu.PlacementTarget = anchor; - menu.Placement = System.Windows.Controls.Primitives.PlacementMode.Left; - menu.IsOpen = true; + if (DataContext is MainViewModel vm) vm.ToggleSettingsDrawer(); e.Handled = true; } - - /// Right-click goes straight to App Settings — the same shortcut the old gear had. - private void SettingsTab_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e) - { - e.Handled = true; - if (DataContext is MainViewModel { OpenSettingsCommand: { } open } && open.CanExecute(null)) - open.Execute(null); - } } diff --git a/Controls/SettingsDrawer.xaml b/Controls/SettingsDrawer.xaml new file mode 100644 index 0000000..da8e96c --- /dev/null +++ b/Controls/SettingsDrawer.xaml @@ -0,0 +1,104 @@ + + + + + + + + + +