Chat colours: the tint and bar span the divider; a stronger top wash; capture fixture

?colors=1 (with ?chats=N) names, stars and colours the fixture chats and
keeps colours picked with chat_color, for capture review.
This commit is contained in:
2026-11-03 11:12:31 +00:00
parent f7b5958d64
commit 56e78ef940
4 changed files with 98 additions and 39 deletions
+39 -30
View File
@@ -157,7 +157,7 @@ class AppListRow extends StatelessWidget {
final tint = accent?.withValues(
alpha: _darkSurface(context, cupertino) ? 0.12 : 0.07,
);
Widget surface = cupertino
final surface = cupertino
? _CupertinoRowSurface(
tapKey: tapKey,
onTap: onTap,
@@ -178,40 +178,49 @@ class AppListRow extends StatelessWidget {
child: content,
),
);
if (accent case final accent?) {
surface = DecoratedBox(
key: appListRowAccentKey,
position: DecorationPosition.foreground,
decoration: BoxDecoration(
border: BorderDirectional(
start: BorderSide(color: accent, width: 4),
),
),
child: surface,
);
}
if (!divider) return surface;
// The colour bar runs the row's whole height, divider included, and
// the tint fills the divider's inset too, so coloured rows read as
// one band each.
Widget marked(Widget row) => accent == null
? row
: DecoratedBox(
key: appListRowAccentKey,
position: DecorationPosition.foreground,
decoration: BoxDecoration(
border: BorderDirectional(
start: BorderSide(color: accent!, width: 4),
),
),
child: row,
);
if (!divider) return marked(surface);
// The divider stays under the text column; a checkbox's width is
// not known here, so a selectable row's divider starts at the inset.
final textStart = selectionControl != null
? start
: start + (showLeading ? kAppListAvatarSize + _avatarGap : 0);
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
surface,
Padding(
padding: EdgeInsetsDirectional.only(start: textStart),
child: SizedBox(
key: appListRowDividerKey,
height: cupertino
? 1 / MediaQuery.devicePixelRatioOf(context)
: 1,
child: ColoredBox(color: styles.divider),
),
),
],
final line = Padding(
padding: EdgeInsetsDirectional.only(start: textStart),
child: SizedBox(
key: appListRowDividerKey,
height: cupertino
? 1 / MediaQuery.devicePixelRatioOf(context)
: 1,
child: ColoredBox(color: styles.divider),
),
);
return marked(
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
surface,
if (tint != null && !selected)
ColoredBox(color: tint, child: line)
else
line,
],
),
);
},
),