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 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../theme/app_design_tokens.dart';
|
||||||
import 'app_list_avatar.dart';
|
import 'app_list_avatar.dart';
|
||||||
|
|
||||||
/// Below this row width (a list pane squeezed beside its detail) a row is
|
/// 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);
|
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(
|
final surface = Material(
|
||||||
key: appListRowSurfaceKey,
|
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)
|
? selectedFill ?? selectedColor(context)
|
||||||
: tint ?? Colors.transparent,
|
: tint ?? Colors.transparent,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
@@ -218,6 +236,9 @@ class AppListRow extends StatelessWidget {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: BorderDirectional(
|
border: BorderDirectional(
|
||||||
start: BorderSide(color: bar, width: kAppListRowBarWidth),
|
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,
|
child: row,
|
||||||
|
|||||||
Reference in New Issue
Block a user