Terminal design: frame and stronger fill on the open list row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../theme/app_design_tokens.dart';
|
||||
import 'app_list_avatar.dart';
|
||||
|
||||
/// Below this row width (a list pane squeezed beside its detail) a row is
|
||||
@@ -187,9 +188,26 @@ class AppListRow extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
final tint = tintFor(context, accent);
|
||||
// A terminal design's flat surfaces make a tonal fill too faint
|
||||
// beside tinted rows: the open row takes its bar colour, stronger,
|
||||
// and a hairline frame (below).
|
||||
final framed = selected && AppDesignTokens.of(context).terminal;
|
||||
final frameColor =
|
||||
selectionAccent ??
|
||||
accent ??
|
||||
Theme.of(context).colorScheme.primary;
|
||||
final surface = Material(
|
||||
key: appListRowSurfaceKey,
|
||||
color: selected
|
||||
color: framed
|
||||
? Color.alphaBlend(
|
||||
frameColor.withValues(
|
||||
alpha: Theme.of(context).brightness == Brightness.dark
|
||||
? .26
|
||||
: .2,
|
||||
),
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
)
|
||||
: selected
|
||||
? selectedFill ?? selectedColor(context)
|
||||
: tint ?? Colors.transparent,
|
||||
child: InkWell(
|
||||
@@ -218,6 +236,9 @@ class AppListRow extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
border: BorderDirectional(
|
||||
start: BorderSide(color: bar, width: kAppListRowBarWidth),
|
||||
top: framed ? BorderSide(color: bar) : BorderSide.none,
|
||||
end: framed ? BorderSide(color: bar) : BorderSide.none,
|
||||
bottom: framed ? BorderSide(color: bar) : BorderSide.none,
|
||||
),
|
||||
),
|
||||
child: row,
|
||||
|
||||
Reference in New Issue
Block a user