fix(socials): the bar disappeared from the preview when the plate was off
My own regression from the previous commit: the plate Border WRAPPED the bar's content and its Visibility was bound to BarBackgroundEnabled — so with the plate off (the default) the preview collapsed the entire social bar. Nothing was wrong with the data; the element was there and invisible. Fix: the wrapper is always laid out. "Plate off" now means a TRANSPARENT background (`SocialBarBackgroundBrush` returns Transparent when disabled) and zero padding, "on" means the colour/opacity plate with 18,6 padding — which also matches what the renderer bakes for the output, so preview and broadcast agree. Guard (new fact in SocialBarAppearanceTests): the preview must never visibility-gate the bar on BarBackgroundEnabled, the wrapper must bind SocialBarBackgroundBrush, and the plate's switching must be Padding.
This commit is contained in:
@@ -35,8 +35,11 @@ public partial class MainViewModel
|
||||
/// so the two cannot drift apart (creator request 2026-10-30).</summary>
|
||||
public SolidColorBrush SocialBarTextBrush => SocialBarStyle.From(_socials).TextBrush;
|
||||
|
||||
/// <summary>The preview's plate: same colour AND same opacity the renderer bakes in.</summary>
|
||||
public SolidColorBrush SocialBarBackgroundBrush => SocialBarStyle.From(_socials).BackgroundBrush;
|
||||
/// <summary>The preview's plate: same colour AND same opacity the renderer bakes in.
|
||||
/// Transparent when the plate is off — "off" means no plate, never no bar.</summary>
|
||||
public SolidColorBrush SocialBarBackgroundBrush => _socials?.BarBackgroundEnabled == true
|
||||
? SocialBarStyle.From(_socials).BackgroundBrush
|
||||
: Brushes.Transparent;
|
||||
|
||||
/// <summary>The global socials config (entries + bar settings), or null.</summary>
|
||||
public SocialsConfig? Socials => _socials;
|
||||
|
||||
Reference in New Issue
Block a user