Palette: seven roles (accent, good, caution added; highlight renamed alarm); no hard-coded colours left
background, foreground, subdued, accent (emphasis without danger), and the state gradient good → caution → alarm; surface and onFill derived. smart-serow's four-key themes still load (highlight = alarm; the new roles fall back). Material's scheme follows: buttons in accent instead of the alarm colour. Link state, mock banner, signal tiles, raw log, checklist button and marks, camera page all take palette roles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// every readout is a box that takes its share of a row (`flex`) and sizes its type
|
||||
// from its own height, so a layout is a grid of boxes, and a value changing digits
|
||||
// never moves anything. Value in foreground with tabular figures, unit and label in
|
||||
// subdued; a warning turns the value to highlight.
|
||||
// subdued; a warning turns the value to alarm.
|
||||
//
|
||||
// Added for Yukart: [dim]. A missing or stale value is a normal state in a car
|
||||
// (app guideline 2), shown in subdued rather than hidden.
|
||||
@@ -28,7 +28,7 @@ class StatBox extends StatelessWidget {
|
||||
final String label;
|
||||
final int flex;
|
||||
|
||||
/// If it returns true, the value shows in highlight.
|
||||
/// If it returns true, the value shows in alarm.
|
||||
final bool Function()? isWarning;
|
||||
|
||||
/// Missing or stale: the value shows in subdued.
|
||||
@@ -41,7 +41,7 @@ class StatBox extends StatelessWidget {
|
||||
final valueColor = dim
|
||||
? theme.subdued
|
||||
: warning
|
||||
? theme.highlight
|
||||
? theme.alarm
|
||||
: theme.foreground;
|
||||
|
||||
return Expanded(
|
||||
@@ -168,7 +168,7 @@ class StatBoxMain extends StatelessWidget {
|
||||
color: dim
|
||||
? theme.subdued
|
||||
: warning
|
||||
? theme.highlight
|
||||
? theme.alarm
|
||||
: theme.foreground,
|
||||
height: 1,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user