Skip to content

Commit ff86969

Browse files
committed
inbox [nfc]: Place dark variant for DM header background, from web
NFC because we don't support dark theme yet.
1 parent 108bfc3 commit ff86969

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/widgets/inbox.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ class _AllDmsHeaderItem extends _HeaderItem {
306306
@override Color collapsedIconColor(context) => const Color(0xFF222222);
307307
@override Color uncollapsedIconColor(context) => const Color(0xFF222222);
308308

309-
@override Color uncollapsedBackgroundColor(context) => const HSLColor.fromAHSL(1, 46, 0.35, 0.93).toColor();
309+
@override Color uncollapsedBackgroundColor(context) => DesignVariables.of(context).dmHeaderBg;
310310
@override Color? unreadCountBadgeBackgroundColor(context) => null;
311311

312312
@override Future<void> onCollapseButtonTap() async {

lib/widgets/theme.dart

+7
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
139139
mainBackground: const Color(0xfff0f0f0),
140140
title: const Color(0xff1a1a1a),
141141
channelColorSwatches: ChannelColorSwatches.light,
142+
dmHeaderBg: const HSLColor.fromAHSL(1, 46, 0.35, 0.93).toColor(),
142143
loginOrDivider: const Color(0xffdedede),
143144
loginOrDividerText: const Color(0xff575757),
144145
star: const HSLColor.fromAHSL(0.5, 47, 1, 0.41).toColor(),
@@ -157,6 +158,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
157158
mainBackground: const Color(0xff1d1d1d),
158159
title: const Color(0xffffffff),
159160
channelColorSwatches: ChannelColorSwatches.dark,
161+
dmHeaderBg: const HSLColor.fromAHSL(1, 46, 0.15, 0.2).toColor(),
160162
loginOrDivider: const Color(0xff424242),
161163
loginOrDividerText: const Color(0xffa8a8a8),
162164
// TODO(#95) unchanged in dark theme?
@@ -175,6 +177,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
175177
required this.mainBackground,
176178
required this.title,
177179
required this.channelColorSwatches,
180+
required this.dmHeaderBg,
178181
required this.loginOrDivider,
179182
required this.loginOrDividerText,
180183
required this.star,
@@ -205,6 +208,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
205208
final ChannelColorSwatches channelColorSwatches;
206209

207210
// Not named variables in Figma; taken from older Figma drafts, or elsewhere.
211+
final Color dmHeaderBg;
208212
final Color loginOrDivider; // TODO(#95) need proper dark-theme color (this is ad hoc)
209213
final Color loginOrDividerText; // TODO(#95) need proper dark-theme color (this is ad hoc)
210214
final Color star;
@@ -222,6 +226,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
222226
Color? mainBackground,
223227
Color? title,
224228
ChannelColorSwatches? channelColorSwatches,
229+
Color? dmHeaderBg,
225230
Color? loginOrDivider,
226231
Color? loginOrDividerText,
227232
Color? star,
@@ -238,6 +243,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
238243
mainBackground: mainBackground ?? this.mainBackground,
239244
title: title ?? this.title,
240245
channelColorSwatches: channelColorSwatches ?? this.channelColorSwatches,
246+
dmHeaderBg: dmHeaderBg ?? this.dmHeaderBg,
241247
loginOrDivider: loginOrDivider ?? this.loginOrDivider,
242248
loginOrDividerText: loginOrDividerText ?? this.loginOrDividerText,
243249
star: star ?? this.star,
@@ -261,6 +267,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
261267
mainBackground: Color.lerp(mainBackground, other.mainBackground, t)!,
262268
title: Color.lerp(title, other.title, t)!,
263269
channelColorSwatches: ChannelColorSwatches.lerp(channelColorSwatches, other.channelColorSwatches, t),
270+
dmHeaderBg: Color.lerp(dmHeaderBg, other.dmHeaderBg, t)!,
264271
loginOrDivider: Color.lerp(loginOrDivider, other.loginOrDivider, t)!,
265272
loginOrDividerText: Color.lerp(loginOrDividerText, other.loginOrDividerText, t)!,
266273
star: Color.lerp(star, other.star, t)!,

0 commit comments

Comments
 (0)