The creator (2026-10-21), on Live -> Layers -> webcam -> Properties:
"why does the drop down under the web cam properties not show the same style for
the border color drop down list box?"
"one of the first things we did was define branding. We established look-and-feel
standards. And yet you keep ignoring these and I'm wondering why"
WHY IT WAS MISSED - the answer the creator is owed.
The TASK 58 sweep had already walked the whole app for un-themed controls and the
border picker STILL was not themed, because the sweep looked for control TYPES
(ComboBox / CheckBox / TextBox) carrying no theme style - and the border picker was
NONE of those. It was a "..." Button whose Click handler built a ContextMenu of
swatches in code. It was never in the sweep's scope, and PropertiesStyleTests.cs
(a type-based guard) could not see it either. A picker that LOOKS like a drop-down
is invisible to a type-based audit; the guard has to ask "is this the app's widget?".
WHAT CHANGED
- The picker is now the app's YtComboBox - the widget the Display and Font pickers
wear - bound to the palette (SelectedElement.BorderColorOptions) with its selection
bound by VALUE (SelectedItem -> BorderColorEntry), because WPF's SelectedValue
matching is ordinal and the palette mixes #FFFFFF and #e94560.
- The closed box shows the swatch + the colour's NAME; the rows show swatch + hex +
name (the rows the creator approved in TASK 60). A ComboBox cannot do that with one
ItemTemplate - WPF copies it into the read-only SelectionBoxItemTemplate - so
Helpers/ClosedBoxTemplateSelector.cs picks by the ContentPresenter's templated
parent: the ComboBox for the closed box, the ComboBoxItem for a row. Verified
against WPF with a throwaway probe, not assumed.
- The swatch is painted by the THEME (Helpers/HexToBrushConverter.cs, registered as
HexToBrush) - the hand-painted SolidColorBrush(Color.FromRgb(...)) in the old
click handler was the exact anti-pattern the theme forbids. The swatch also carries
a 1px #2a3a5e border now, so black and dark swatches are visible on the dark menu
(the follow-up TASK 60 left open).
- The hex field stays (60px, editable): a colour outside the palette can still be
typed, and the drop-down then carries that hex as a NAMELESS entry ("no name" is the
honest answer). The palette's name moved out of TASK 62's TextBlock into the
drop-down's closed box.
- The hand-built menu, its ContextMenu/MenuItem/SolidColorBrush code and
WebcamBorderColorPicker_Click are gone.
MODEL: SceneElement.BorderColorName -> BorderColorEntry (the palette entry for the
current hex, with its name; setting it writes the hex back) + BorderColorOptions (the
palette plus the custom entry), both raised when BorderColor changes.
BorderColorPalette gains EntryFor(hex) and OptionsFor(hex); NameOf delegates.
Guards: ytLive.Tests/BorderColorPickerTests.cs (the ONE test for this change - the
model, the panel, and the REAL widget: with the app's theme style and the panel's own
templates the closed box names the colour and the rows show the hex AND the name).
The TASK 60 guard (BorderColorPaletteTests) was updated because the mechanism it
asserted - a code-built menu - no longer exists; it now guards the new wiring (the
drop-down is bound to the palette and neither the panel nor the code-behind carries a
second list of colours).
Full suite: 435/435 passed, 0 warnings.
8.1 KiB
8.1 KiB
Models — index
Plain data types. No logic beyond what a property can carry. See
schema.md for the memory-map conventions.
| File | Purpose |
|---|---|
Scene.cs |
A scene: Name, IsHidden, IsChatScene, IsEditing, HasBackdrop (Live-only policy flag, default off — only the canonical Live scene has one, see SceneCatalog), Elements collection (images + webcam config), WebcamConfig accessor |
SceneCatalog.cs |
The five canonical scenes (Starting/Live/BRB/Chat/Ending) — the product, by name: All, IsCanonical, Is(name, canonical) (case-insensitive trim), IsChat, HasBackdrop(name) (true only for Live). Drives the empty-DB seed, the "+" missing-scenes menu, and MainViewModel.EnforceBackdropPolicy |
Source.cs |
A source: SourceType enum (DisplayCapture/WindowCapture/Background/Image/TextOverlay/ChatBox/Countdown/WebSource/MediaSource/AlertBox (TASK 43 — the celebration zone, one per layout) — Webcam removed), X/Y/Width/Height, Opacity, IsEnabled, ImageSource (static) / VideoImageSource (live frames), DisplaySource (IsLiveCapture → video, else static), ClipShape enum (Traditional/Round), IsMirrored + MirrorScale, MirrorButtonText, asset identity, IsImageSource (XAML binds this, never Type), backdrop surface: IsBackdrop (permanent bottom layer, never removable), CaptureKey (persisted monitor:<n>/window:<hwnd>/picker:<name>), IsLiveCapture (Type is Display/WindowCapture) |
SceneElement.cs |
Base for anything placeable in a scene: shared layout/clip/mirror/border surface, virtual IsWebcam/virtual IsImageSource/virtual IsZoomLayer (TASK 52); ToggleClipShape + persisted RectWidth/RectHeight (pre-Round rect so round→rect restores after reload); TASK 57: the geometry setters (X/Y/Width/Height) are virtual so a derived element can CONSTRAIN every write (the webcam clamps itself into the vertical tier's band) instead of every writer re-implementing the rule; ClipShape + ToggleClipShape() are virtual too, so a derived element can CONSTRAIN the shape (the Chat scene's vertical camera is rect-only); TASK 59: IsRectShape/IsRoundShape — the shape as a CHOICE (the properties panel shows Rect |
VerticalCameraLayout.cs |
TASK 57 (the "vv" feature): the vertical (9:16) tier's camera rules as pure math — TileWidth/TileHeight (270×152 master px = 480×270 in the 1080×1920 output), Inset (32 master px from the band's outer edge), IsVerticalTier(QualityOption) (portrait tier), AreaFor(band, bottom) (the band splits into two 607×540 areas), MaxSizeFor(band), SpotFor(band, w, h, centreX, centreY) (the six spots — the area and column the tile's centre falls in, inset, never outside the band) and DefaultSpot (bottom-right, the corner the 16:9 default webcam uses), FillsArea(band, width) (the camera is wide enough to fill a whole area = "enlarged") and SizeFor(band, requestedWidth) (the Chat camera's TWO sizes - the small tile or one whole 607×540 area — whichever is nearer the requested width, so the resize handle has two detents) |
ZoomSceneElement.cs |
Transient zoom box (TASK 52, creator-corrected 2026-10-08): carries the box rect AND the anchored CaptureX/CaptureY (the fixed box/2 capture window set on ActivateZoom; moving the box never touches it). IsZoomActive flips Kind Static→Dynamic (leaves the baked base while active); never persisted (LayoutStore save skips non-Source/non-WebcamSceneConfig rows), never shown in the layers list or the element template (IsZoomLayer gates both). The compositor SKIPS the active element in every layer loop and draws its 2x content LAST (layer n+1) via ZoomMagnifier. |
Webcam.cs |
Singleton webcam identity: Id, DeviceId, Name (one row app-wide) |
BackgroundEffect.cs |
TASK 51: per-webcam background effect enum None / Remove / Blur, carried by WebcamSceneConfig |
BorderColorPalette.cs |
TASK 60: the colours the webcam's border-colour drop-down offers — NamedColor(Hex, Name) + BorderColorPalette.All (the single source of truth; the drop-down is bound to it) and NameOf(hex) (case-insensitive; empty for a colour outside the palette — "no name" is the honest answer, TASK 62). The creator asked for a colour NAME next to each hex: #e94560 Crimson. TASK 63: EntryFor(hex) (the palette entry for a hex, case-insensitively; a nameless entry for a colour outside the palette) and OptionsFor(hex) (the palette + that entry) — the two the drop-down binds to; NamedColor.ToString() is "Crimson (#e94560)" |
WebcamSceneConfig.cs |
Per-scene webcam placement (subclass of SceneElement): geometry + IsVisible + border (BorderColor/BorderOpacity/BorderWidth/BorderAnimation) + VideoImageSource; WebcamId links to Webcam; TASK 51: BackgroundEffect + BackgroundStrength (0..1, default 0.5) + the radio-pill surface RemoveBackground/BlurBackground (one on turns the other off; both off = None) + HasBackgroundEffect (shows the strength slider); TASK 57 (the "vv" feature): the vertical (9:16) tier's OWN placement per scene — VerticalX/Y/Width/Height/VerticalClipShape/VerticalRectWidth/VerticalRectHeight (persisted, NULL = no vertical placement yet) + the transient VerticalBand/VerticalLayoutLive/LandscapeX…LandscapeRectHeight (the parked 16:9 layout) + BeginVerticalLayout/EndVerticalLayout/CommitLiveLayoutToVertical (the tier swap) and the X/Y/Width/Height overrides that clamp every write into the band; VerticalShapeLocked (the Chat scene's vertical layout is rect-only) overrides ClipShape + ToggleClipShape() so no writer can slip a circle in |
QualityOption.cs |
Resolution tier record (Display, Fps, Bitrate, Width, Height); Label formats as 1080p60 (8Mbps) — drives the bottom-bar dropdown and the output-rect math |
StreamConfig.cs |
StreamConfig (note: TargetBitrate/Resolution defaults are stale — not yet wired to the dropdown), StreamHealth (bitrate/FPS/dropped/duration), StreamStatus enum |
MicStatus.cs |
Footer mic indicator: NotConnected / Connected / Problem — the state behind the MIC button's status dot (red = no device/capture off, green = capturing, yellow = a requested mic failed: in use/unplugged) |
YouTube.cs |
YouTubeChannel and ChatMessage (chat feed) — since TASK 43 every message carries Kind (ChatEventKind None/SuperChat/SuperSticker/NewMember/MemberGift/GiftReceived/MemberMilestone) + event payload fields (SuperChatDisplayString, SuperStickerDescription, GiftNewMembersCount, GifterName, MilestoneMonths) |
Socials.cs |
Social bar (global layer, never a Source): SocialService enum (YouTube/Twitch/X/Instagram/TikTok/Facebook/Discord/Kick/Threads/Bluesky/GitHub/LinkedIn/Pinterest/Snapchat/Reddit/WhatsApp/Telegram/Link/Website/Fediverse), SocialEntry (Service/Handle/ProfileUrl/FediverseSoftware), SocialsConfig (Entries + BarPosition Top/Bottom + BarEnabled on/off — BarJustify dropped, column back-compat), SocialServiceIcons (canonical URL builder + DetectService (URL domain / fediverse @user@domain → Fediverse / bare→Website) + bundled SVG logo path data per service (LogoDataFor) + LogoDataForFediverse(software) mapping nodeinfo software names (mastodon/peertube/pixelfed/misskey/lemmy/pleroma/firefish) to logos with a generic fediverse glyph fallback (FediverseIconData) + LockedIconData/DoNotIconData — initials/colors gone) |
Related: ViewModels/index.md consume these;
Services/LayoutStore.cs persists Scene/Source.