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:
2026-10-30 09:06:53 -07:00
parent c1212644b0
commit 51d9dd09c7
3 changed files with 31 additions and 6 deletions
+12 -4
View File
@@ -351,10 +351,18 @@
<DropShadowEffect Color="{Binding SocialBarGlowBrush.Color}"
BlurRadius="18" ShadowDepth="0" Opacity="0.9"/>
</Grid.Effect>
<Border HorizontalAlignment="Center" Margin="40,8"
CornerRadius="20" Padding="18,6"
Background="{Binding SocialBarBackgroundBrush}"
Visibility="{Binding Socials.BarBackgroundEnabled, Converter={StaticResource BoolToVis}}">
<Border HorizontalAlignment="Center" Margin="40,8" CornerRadius="20"
Background="{Binding SocialBarBackgroundBrush}">
<Border.Style>
<Style TargetType="Border">
<Setter Property="Padding" Value="0"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Socials.BarBackgroundEnabled}" Value="True">
<Setter Property="Padding" Value="18,6"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<ItemsControl ItemsSource="{Binding Socials.Entries}"
HorizontalAlignment="Center"
IsHitTestVisible="False">