Skip to content

Commit 14ec020

Browse files
theme: Replace colorMessageHeaderIconInteractive with title
The `colorMessageHeaderIconInteractive` giving color to follow/mute icons beside topic names have been replaced to a lighter and darker versions in dark and light themes respectively, using the `title` variable of `DesignVariables`. This specific UI doesn't appear in the Figma design, but we use `title` because it's used there for the color of a dropdown icon that also appears next to topics. Figma: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=4021-7569&t=b56sVJ6in9zEY1tU-0 discussion: zulip#1213 (comment), zulip#1213 (comment)
1 parent e0df0ed commit 14ec020

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

lib/widgets/message_list.dart

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import '../model/typing_status.dart';
1414
import 'action_sheet.dart';
1515
import 'actions.dart';
1616
import 'app_bar.dart';
17+
import 'color.dart';
1718
import 'compose_box.dart';
1819
import 'content.dart';
1920
import 'emoji_reaction.dart';
@@ -373,8 +374,7 @@ class MessageListAppBarTitle extends StatelessWidget {
373374
Padding(
374375
padding: const EdgeInsetsDirectional.only(start: 4),
375376
child: Icon(icon,
376-
// TODO(design) copies the recipient header in web; is there a better color?
377-
color: designVariables.colorMessageHeaderIconInteractive, size: 14)),
377+
color: designVariables.title.withFadedAlpha(0.5), size: 14)),
378378
]);
379379
}
380380

@@ -1125,8 +1125,7 @@ class StreamMessageRecipientHeader extends StatelessWidget {
11251125
overflow: TextOverflow.ellipsis,
11261126
style: recipientHeaderTextStyle(context))),
11271127
const SizedBox(width: 4),
1128-
// TODO(design) copies the recipient header in web; is there a better color?
1129-
Icon(size: 14, color: designVariables.colorMessageHeaderIconInteractive,
1128+
Icon(size: 14, color: designVariables.title.withFadedAlpha(0.5),
11301129
// A null [Icon.icon] makes a blank space.
11311130
iconDataForTopicVisibilityPolicy(
11321131
store.topicVisibilityPolicy(message.streamId, topic))),

lib/widgets/theme.dart

-7
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
150150
bgSearchInput: const Color(0xffe3e3e3),
151151
textMessage: const Color(0xff262626),
152152
channelColorSwatches: ChannelColorSwatches.light,
153-
colorMessageHeaderIconInteractive: Colors.black.withValues(alpha: 0.2),
154153
contextMenuCancelBg: const Color(0xff797986).withValues(alpha: 0.15),
155154
contextMenuCancelPressedBg: const Color(0xff797986).withValues(alpha: 0.20),
156155
dmHeaderBg: const HSLColor.fromAHSL(1, 46, 0.35, 0.93).toColor(),
@@ -202,7 +201,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
202201
contextMenuCancelBg: const Color(0xff797986).withValues(alpha: 0.15), // the same as the light mode in Figma
203202
contextMenuCancelPressedBg: const Color(0xff797986).withValues(alpha: 0.20), // the same as the light mode in Figma
204203
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
205-
colorMessageHeaderIconInteractive: Colors.white.withValues(alpha: 0.2),
206204
dmHeaderBg: const HSLColor.fromAHSL(1, 46, 0.15, 0.2).toColor(),
207205
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
208206
groupDmConversationIcon: Colors.white.withValues(alpha: 0.5),
@@ -256,7 +254,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
256254
required this.bgSearchInput,
257255
required this.textMessage,
258256
required this.channelColorSwatches,
259-
required this.colorMessageHeaderIconInteractive,
260257
required this.contextMenuCancelBg,
261258
required this.contextMenuCancelPressedBg,
262259
required this.dmHeaderBg,
@@ -318,7 +315,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
318315
final ChannelColorSwatches channelColorSwatches;
319316

320317
// Not named variables in Figma; taken from older Figma drafts, or elsewhere.
321-
final Color colorMessageHeaderIconInteractive;
322318
final Color contextMenuCancelBg; // In Figma, but unnamed.
323319
final Color contextMenuCancelPressedBg; // In Figma, but unnamed.
324320
final Color dmHeaderBg;
@@ -367,7 +363,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
367363
Color? bgSearchInput,
368364
Color? textMessage,
369365
ChannelColorSwatches? channelColorSwatches,
370-
Color? colorMessageHeaderIconInteractive,
371366
Color? contextMenuCancelBg,
372367
Color? contextMenuCancelPressedBg,
373368
Color? dmHeaderBg,
@@ -415,7 +410,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
415410
bgSearchInput: bgSearchInput ?? this.bgSearchInput,
416411
textMessage: textMessage ?? this.textMessage,
417412
channelColorSwatches: channelColorSwatches ?? this.channelColorSwatches,
418-
colorMessageHeaderIconInteractive: colorMessageHeaderIconInteractive ?? this.colorMessageHeaderIconInteractive,
419413
contextMenuCancelBg: contextMenuCancelBg ?? this.contextMenuCancelBg,
420414
contextMenuCancelPressedBg: contextMenuCancelPressedBg ?? this.contextMenuCancelPressedBg,
421415
dmHeaderBg: dmHeaderBg ?? this.dmHeaderBg,
@@ -470,7 +464,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
470464
bgSearchInput: Color.lerp(bgSearchInput, other.bgSearchInput, t)!,
471465
textMessage: Color.lerp(textMessage, other.textMessage, t)!,
472466
channelColorSwatches: ChannelColorSwatches.lerp(channelColorSwatches, other.channelColorSwatches, t),
473-
colorMessageHeaderIconInteractive: Color.lerp(colorMessageHeaderIconInteractive, other.colorMessageHeaderIconInteractive, t)!,
474467
contextMenuCancelBg: Color.lerp(contextMenuCancelBg, other.contextMenuCancelBg, t)!,
475468
contextMenuCancelPressedBg: Color.lerp(contextMenuCancelPressedBg, other.contextMenuCancelPressedBg, t)!,
476469
dmHeaderBg: Color.lerp(dmHeaderBg, other.dmHeaderBg, t)!,

0 commit comments

Comments
 (0)