design: the code-set state colours now agree with the standard

Last inconsistency from the sweep: several VM-side state colours are still literals, and after
the palette moved they disagreed with everything around them — the top bar's LIVE state would
have painted the retired pink-red while the tile beside it used the standard red.

Values aligned (tokenisation of these sites is its own unit — they are strings bound to
Background/Foreground, so the fix is a VM->Brush refactor, not a find/replace):
- live / on-air / recorder dot: #e94560 -> #ff5451 (the standard red)
- error banner: #8f1f1f -> #93000a (error-container)
- audio meter bands follow the doc's stated thresholds: nominal cyan #38bdf8, caution amber
  #ffb95f, peak #ff5451 — they were green/yellow/red, which contradicted DESIGN.md's own table

GameMeterHonestyTests pinned the old band colours; its intent (the meter scales by volume) is
unchanged, so the two colour expectations now name the new bands.
This commit is contained in:
2026-10-30 08:30:33 -07:00
parent 8502c1d194
commit c885bbd782
4 changed files with 14 additions and 14 deletions
+6 -6
View File
@@ -68,9 +68,9 @@ public partial class MainViewModel
public string MeterBrush => MeterLevel switch
{
< 0.6 => "#22c55e",
< 0.8 => "#eab308",
_ => "#ef4444",
< 0.6 => "#38bdf8",
< 0.8 => "#ffb95f",
_ => "#ff5451",
};
/// <summary>Previewes the volume position while the slider is dragged; the
@@ -283,9 +283,9 @@ public partial class MainViewModel
public string GameMeterBrush => GameMeterLevel switch
{
< 0.6 => "#22c55e",
< 0.8 => "#eab308",
_ => "#ef4444",
< 0.6 => "#38bdf8",
< 0.8 => "#ffb95f",
_ => "#ff5451",
};
public void SetGameVolumeAdjusting(bool adjusting)
@@ -316,7 +316,7 @@ public partial class MainViewModel : ViewModelBase
return;
}
HealthIssueBackground = report.IsError ? "#8f1f1f" : "#b8860b";
HealthIssueBackground = report.IsError ? "#93000a" : "#b8860b";
HealthIssueBanner = report.Text;
}
@@ -486,8 +486,8 @@ public partial class MainViewModel : ViewModelBase
var live = IsLive;
// A live TEST broadcast wears gold, not the live red — the TEST badge +
// gold are the "this is a rehearsal" cue (TASK 41).
TopBarBackground = live ? IsTestStream ? "#9c6f1c" : "#e94560" : "#16213e";
PreviewGlowBrush = live ? IsTestStream ? "#9c6f1c" : "#e94560" : "Transparent";
TopBarBackground = live ? IsTestStream ? "#9c6f1c" : "#ff5451" : "#16213e";
PreviewGlowBrush = live ? IsTestStream ? "#9c6f1c" : "#ff5451" : "Transparent";
PreviewGlowThickness = live ? new Thickness(3) : new Thickness(0);
if (!live) _healthPollTimer.Stop();
+3 -3
View File
@@ -87,10 +87,10 @@ public partial class MainViewModel : ViewModelBase
public bool IsOffline => StreamStatus == StreamStatus.Offline;
public bool IsLive => StreamStatus == StreamStatus.Streaming;
public bool IsLivePrivate => IsLive && string.Equals(StreamVisibility, "Private", StringComparison.OrdinalIgnoreCase);
public string RecDotBrush => !IsRecording ? "#555555" : "#e94560";
public string RecDotBrush => !IsRecording ? "#555555" : "#ff5451";
public string RecTextBrush => (IsLive || IsRecording) ? "#ffffff" : "#888888";
public double RecDotOpacity => IsRecording ? _recDotPulse : 0.55;
public string OnAirBrush => !IsLive ? "#555555" : IsLivePrivate ? "#22c55e" : "#e94560";
public string OnAirBrush => !IsLive ? "#555555" : IsLivePrivate ? "#22c55e" : "#ff5451";
// ─── REC / ON-AIR pills (TASK 18) ───
public bool RecordPillOn
@@ -222,7 +222,7 @@ public partial class MainViewModel : ViewModelBase
/// <summary>Reality dot color, one meaning per mode: gold = test, red = live,
/// green = recording. The pre-spec pulsing lamp never shipped; the word + bar
/// color carry the state and the dot just pins it.</summary>
public string RunningDotBrush => IsTestStream ? "#9c6f1c" : IsLive ? "#e94560" : "#22c55e";
public string RunningDotBrush => IsTestStream ? "#9c6f1c" : IsLive ? "#ff5451" : "#22c55e";
/// <summary>Raises every flag the top bar renders, so any state change re-renders
/// exactly the world that is now true.</summary>
+2 -2
View File
@@ -48,14 +48,14 @@ public sealed class GameMeterHonestyTests
vm.GameAudioVolume = 1.0;
vm.GameAudioLevel = 1.0;
Assert.True(vm.GameMeterFillWidth > 230, "unity volume must keep the meter hot");
Assert.Equal("#ef4444", vm.GameMeterBrush);
Assert.Equal("#ff5451", vm.GameMeterBrush); // DESIGN.md: peak band
// Drop the knob to 20% — the captured level does NOT change (the OS
// tap is pre-endpoint-volume); the meter must scale it anyway.
vm.GameAudioVolume = 0.2;
vm.GameAudioLevel = 1.0;
Assert.InRange(vm.GameMeterFillWidth, 40, 80);
Assert.Equal("#22c55e", vm.GameMeterBrush);
Assert.Equal("#38bdf8", vm.GameMeterBrush); // DESIGN.md: nominal band
// And the push really reached the (faked) endpoint — one knob, honest.
Assert.Contains(0.2, pushed);