Skip to content

Commit 4b70f9f

Browse files
theme[nfc]: Remove colorMessageHeaderIconInteractive
Removed `colorMessageHeaderIconInteractive` from `DesignVariables` and used `title` in place of it as per the design guidelines. discussion: zulip#1213 (comment)
1 parent c6aca86 commit 4b70f9f

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

lib/widgets/message_list.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ class MessageListAppBarTitle extends StatelessWidget {
345345
padding: const EdgeInsetsDirectional.only(start: 4),
346346
child: Icon(icon,
347347
// TODO(design) copies the recipient header in web; is there a better color?
348-
color: designVariables.colorMessageHeaderIconInteractive, size: 14)),
348+
color: designVariables.title, size: 14)),
349349
]);
350350
}
351351

@@ -1091,7 +1091,7 @@ class StreamMessageRecipientHeader extends StatelessWidget {
10911091
style: recipientHeaderTextStyle(context))),
10921092
const SizedBox(width: 4),
10931093
// TODO(design) copies the recipient header in web; is there a better color?
1094-
Icon(size: 14, color: designVariables.colorMessageHeaderIconInteractive,
1094+
Icon(size: 14, color: designVariables.title,
10951095
// A null [Icon.icon] makes a blank space.
10961096
iconDataForTopicVisibilityPolicy(
10971097
store.topicVisibilityPolicy(message.streamId, topic))),

lib/widgets/theme.dart

-7
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
147147
bgSearchInput: const Color(0xffe3e3e3),
148148
textMessage: const Color(0xff262626),
149149
channelColorSwatches: ChannelColorSwatches.light,
150-
colorMessageHeaderIconInteractive: Colors.black.withValues(alpha: 0.2),
151150
contextMenuCancelBg: const Color(0xff797986).withValues(alpha: 0.15),
152151
contextMenuCancelPressedBg: const Color(0xff797986).withValues(alpha: 0.20),
153152
dmHeaderBg: const HSLColor.fromAHSL(1, 46, 0.35, 0.93).toColor(),
@@ -199,7 +198,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
199198
contextMenuCancelBg: const Color(0xff797986).withValues(alpha: 0.15), // the same as the light mode in Figma
200199
contextMenuCancelPressedBg: const Color(0xff797986).withValues(alpha: 0.20), // the same as the light mode in Figma
201200
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
202-
colorMessageHeaderIconInteractive: Colors.white.withValues(alpha: 0.2),
203201
dmHeaderBg: const HSLColor.fromAHSL(1, 46, 0.15, 0.2).toColor(),
204202
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
205203
groupDmConversationIcon: Colors.white.withValues(alpha: 0.5),
@@ -253,7 +251,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
253251
required this.bgSearchInput,
254252
required this.textMessage,
255253
required this.channelColorSwatches,
256-
required this.colorMessageHeaderIconInteractive,
257254
required this.contextMenuCancelBg,
258255
required this.contextMenuCancelPressedBg,
259256
required this.dmHeaderBg,
@@ -315,7 +312,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
315312
final ChannelColorSwatches channelColorSwatches;
316313

317314
// Not named variables in Figma; taken from older Figma drafts, or elsewhere.
318-
final Color colorMessageHeaderIconInteractive;
319315
final Color contextMenuCancelBg; // In Figma, but unnamed.
320316
final Color contextMenuCancelPressedBg; // In Figma, but unnamed.
321317
final Color dmHeaderBg;
@@ -364,7 +360,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
364360
Color? bgSearchInput,
365361
Color? textMessage,
366362
ChannelColorSwatches? channelColorSwatches,
367-
Color? colorMessageHeaderIconInteractive,
368363
Color? contextMenuCancelBg,
369364
Color? contextMenuCancelPressedBg,
370365
Color? dmHeaderBg,
@@ -412,7 +407,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
412407
bgSearchInput: bgSearchInput ?? this.bgSearchInput,
413408
textMessage: textMessage ?? this.textMessage,
414409
channelColorSwatches: channelColorSwatches ?? this.channelColorSwatches,
415-
colorMessageHeaderIconInteractive: colorMessageHeaderIconInteractive ?? this.colorMessageHeaderIconInteractive,
416410
contextMenuCancelBg: contextMenuCancelBg ?? this.contextMenuCancelBg,
417411
contextMenuCancelPressedBg: contextMenuCancelPressedBg ?? this.contextMenuCancelPressedBg,
418412
dmHeaderBg: dmHeaderBg ?? this.dmHeaderBg,
@@ -467,7 +461,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
467461
bgSearchInput: Color.lerp(bgSearchInput, other.bgSearchInput, t)!,
468462
textMessage: Color.lerp(textMessage, other.textMessage, t)!,
469463
channelColorSwatches: ChannelColorSwatches.lerp(channelColorSwatches, other.channelColorSwatches, t),
470-
colorMessageHeaderIconInteractive: Color.lerp(colorMessageHeaderIconInteractive, other.colorMessageHeaderIconInteractive, t)!,
471464
contextMenuCancelBg: Color.lerp(contextMenuCancelBg, other.contextMenuCancelBg, t)!,
472465
contextMenuCancelPressedBg: Color.lerp(contextMenuCancelPressedBg, other.contextMenuCancelPressedBg, t)!,
473466
dmHeaderBg: Color.lerp(dmHeaderBg, other.dmHeaderBg, t)!,

0 commit comments

Comments
 (0)