fix(ui): EDIT label is white in both states
The armed state was fixed to on-accent last build, but the resting state kept on-surface-variant (#94a3b8) — so with EDIT off, which is its normal state, the label was grey on the dark bar. The label is white always now; only the fill changes (neutral → blue). The redundant foreground setter is gone, and UiShellTests asserts the resting colour rather than the trigger.
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
looked pressed. -->
|
||||
<ToggleButton IsChecked="{Binding EditingActive, Mode=TwoWay}" Content="EDIT"
|
||||
Cursor="Hand" Height="32" Padding="14,0" Margin="0,0,24,0" VerticalAlignment="Center"
|
||||
FontWeight="Bold" FontSize="12" Foreground="{StaticResource Brush.OnSurfaceVariant}" BorderThickness="0">
|
||||
FontWeight="Bold" FontSize="12" Foreground="{StaticResource Brush.OnAccent}" BorderThickness="0">
|
||||
<ToggleButton.Template>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<Border x:Name="EditBody" Background="{StaticResource Brush.SurfaceContainerHigh}" CornerRadius="4" Padding="{TemplateBinding Padding}">
|
||||
@@ -68,7 +68,6 @@
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="EditBody" Property="Background" Value="{StaticResource Brush.Tertiary}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource Brush.OnAccent}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -30,7 +30,9 @@ public class UiShellTests
|
||||
// 2. EDIT: resting face differs from the armed face, and the label follows it.
|
||||
Assert.Contains("x:Name=\"EditBody\" Background=\"{StaticResource Brush.SurfaceContainerHigh}\"", topBar);
|
||||
Assert.Contains("<Setter TargetName=\"EditBody\" Property=\"Background\" Value=\"{StaticResource Brush.Tertiary}\"/>", topBar);
|
||||
Assert.Contains("<Setter Property=\"Foreground\" Value=\"{StaticResource Brush.OnAccent}\"/>", topBar);
|
||||
// The label is white in BOTH states — only the fill changes. A muted resting colour is
|
||||
// what made it illegible on the dark bar (creator, 2026-10-30).
|
||||
Assert.Contains("FontSize=\"12\" Foreground=\"{StaticResource Brush.OnAccent}\"", topBar);
|
||||
|
||||
// 3. Active scene = orange; live stays red.
|
||||
Assert.Contains("IsStaged}\" Value=\"True\">\n <Setter Property=\"BorderBrush\" Value=\"{StaticResource Brush.Attention}\"/>", strip);
|
||||
|
||||
Reference in New Issue
Block a user