From 89f6aa3a6719e3dd86480dd107d1011d314539b3 Mon Sep 17 00:00:00 2001 From: gramps Date: Wed, 21 Oct 2026 19:58:28 -0700 Subject: [PATCH] TASK 59: the properties panel is a hierarchy, and the shape is a choice The creator's ruling on the webcam's properties: a "Shape" title above the Mirror/Rect row; the drag hint indented under that row "to show parentage"; the same for Geometry, Border Color, Border Thickness; Remove and Blur indented under Background; Strength indented under Blur. One rule covers it: a title owns its content and the content is indented one level (10px) under it - two levels where a title is itself nested (Strength under Blur under Background). The titles are SemiBold 11px #a0a0b0 like the ones already there. The shape also stops being a toggle button that shows the NEXT action ("Round" when the camera was a rectangle) and becomes a CHOICE: two segment options, Rect | Circle, with Rect selected by default - which is what the creator asked for ("Rect should be selected as a default if none exists"). The old ShapeButtonText is gone. The mutual exclusion lives in the MODEL: IsRectShape/IsRoundShape on SceneElement, each setter flipping the shape through ToggleClipShape() (so the pre-round rect is still stored/restored) and always re-raising, so a refused write - the vertical Chat layout is rect-only (TASK 57) - makes the UI snap back instead of sticking. Deliberately NOT a WPF RadioButton group: a group unchecks its siblings by setting IsChecked in code, which makes WPF drop the binding (stackoverflow 7376373; the same trap measured in 50980687/57275046). The Circle option stays hidden where CanToggleClipShape is false, so the circle is still not offered in the vertical Chat layout. Guard: ytLive.Tests/PropertiesHierarchyTests.cs - the model half (Rect by default, pick circle, pick rect, the locked Chat layout refuses the circle) and the panel half (the Shape title owns both options, the circle is the gated one, the hint is indented and follows the row, every titled block's content is at 10px, Strength at 20px). 432/432 green, 0 warnings. --- Controls/LeftPanel.xaml | 59 ++++++---- Controls/LeftPanel.xaml.cs | 6 -- Controls/index.md | 2 +- HANDOFF.md | 23 +++- Models/SceneElement.cs | 32 +++++- Models/index.md | 2 +- MyMistakes.md | 42 ++++++++ TASKS.md | 1 + TASKS/task-59-properties-hierarchy.md | 74 +++++++++++++ ai.md | 1 + ytLive.Tests/PropertiesHierarchyTests.cs | 130 +++++++++++++++++++++++ 11 files changed, 336 insertions(+), 36 deletions(-) create mode 100644 TASKS/task-59-properties-hierarchy.md create mode 100644 ytLive.Tests/PropertiesHierarchyTests.cs diff --git a/Controls/LeftPanel.xaml b/Controls/LeftPanel.xaml index 2019db4..5c26fce 100644 --- a/Controls/LeftPanel.xaml +++ b/Controls/LeftPanel.xaml @@ -238,18 +238,31 @@ ValueChanged="OpacitySlider_ValueChanged" VerticalAlignment="Center"/> - -