From 8402ee4ea39aa44d1fe4297bdae0ccabae2c3d41 Mon Sep 17 00:00:00 2001 From: Gaurav-Kushwaha-1225 Date: Wed, 15 Jan 2025 07:37:34 +0530 Subject: [PATCH] theme: Replace `colorMessageHeaderIconInteractive` with `title` Removed `colorMessageHeaderIconInteractive` from `DesignVariables` and used `title` in place of it as per the design guidelines. discussion: https://github.com/zulip/zulip-flutter/pull/1213#discussion_r1908343739 --- lib/widgets/message_list.dart | 6 ++---- lib/widgets/theme.dart | 7 ------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/widgets/message_list.dart b/lib/widgets/message_list.dart index 825912329c9..3faa442af82 100644 --- a/lib/widgets/message_list.dart +++ b/lib/widgets/message_list.dart @@ -362,8 +362,7 @@ class MessageListAppBarTitle extends StatelessWidget { Padding( padding: const EdgeInsetsDirectional.only(start: 4), child: Icon(icon, - // TODO(design) copies the recipient header in web; is there a better color? - color: designVariables.colorMessageHeaderIconInteractive, size: 14)), + color: designVariables.title, size: 14)), ]); } @@ -1094,8 +1093,7 @@ class StreamMessageRecipientHeader extends StatelessWidget { overflow: TextOverflow.ellipsis, style: recipientHeaderTextStyle(context))), const SizedBox(width: 4), - // TODO(design) copies the recipient header in web; is there a better color? - Icon(size: 14, color: designVariables.colorMessageHeaderIconInteractive, + Icon(size: 14, color: designVariables.title, // A null [Icon.icon] makes a blank space. iconDataForTopicVisibilityPolicy( store.topicVisibilityPolicy(message.streamId, topic))), diff --git a/lib/widgets/theme.dart b/lib/widgets/theme.dart index 5358f73c42f..09c19f51d33 100644 --- a/lib/widgets/theme.dart +++ b/lib/widgets/theme.dart @@ -147,7 +147,6 @@ class DesignVariables extends ThemeExtension { bgSearchInput: const Color(0xffe3e3e3), textMessage: const Color(0xff262626), channelColorSwatches: ChannelColorSwatches.light, - colorMessageHeaderIconInteractive: Colors.black.withValues(alpha: 0.2), contextMenuCancelBg: const Color(0xff797986).withValues(alpha: 0.15), contextMenuCancelPressedBg: const Color(0xff797986).withValues(alpha: 0.20), dmHeaderBg: const HSLColor.fromAHSL(1, 46, 0.35, 0.93).toColor(), @@ -199,7 +198,6 @@ class DesignVariables extends ThemeExtension { contextMenuCancelBg: const Color(0xff797986).withValues(alpha: 0.15), // the same as the light mode in Figma contextMenuCancelPressedBg: const Color(0xff797986).withValues(alpha: 0.20), // the same as the light mode in Figma // TODO(design-dark) need proper dark-theme color (this is ad hoc) - colorMessageHeaderIconInteractive: Colors.white.withValues(alpha: 0.2), dmHeaderBg: const HSLColor.fromAHSL(1, 46, 0.15, 0.2).toColor(), // TODO(design-dark) need proper dark-theme color (this is ad hoc) groupDmConversationIcon: Colors.white.withValues(alpha: 0.5), @@ -253,7 +251,6 @@ class DesignVariables extends ThemeExtension { required this.bgSearchInput, required this.textMessage, required this.channelColorSwatches, - required this.colorMessageHeaderIconInteractive, required this.contextMenuCancelBg, required this.contextMenuCancelPressedBg, required this.dmHeaderBg, @@ -315,7 +312,6 @@ class DesignVariables extends ThemeExtension { final ChannelColorSwatches channelColorSwatches; // Not named variables in Figma; taken from older Figma drafts, or elsewhere. - final Color colorMessageHeaderIconInteractive; final Color contextMenuCancelBg; // In Figma, but unnamed. final Color contextMenuCancelPressedBg; // In Figma, but unnamed. final Color dmHeaderBg; @@ -364,7 +360,6 @@ class DesignVariables extends ThemeExtension { Color? bgSearchInput, Color? textMessage, ChannelColorSwatches? channelColorSwatches, - Color? colorMessageHeaderIconInteractive, Color? contextMenuCancelBg, Color? contextMenuCancelPressedBg, Color? dmHeaderBg, @@ -412,7 +407,6 @@ class DesignVariables extends ThemeExtension { bgSearchInput: bgSearchInput ?? this.bgSearchInput, textMessage: textMessage ?? this.textMessage, channelColorSwatches: channelColorSwatches ?? this.channelColorSwatches, - colorMessageHeaderIconInteractive: colorMessageHeaderIconInteractive ?? this.colorMessageHeaderIconInteractive, contextMenuCancelBg: contextMenuCancelBg ?? this.contextMenuCancelBg, contextMenuCancelPressedBg: contextMenuCancelPressedBg ?? this.contextMenuCancelPressedBg, dmHeaderBg: dmHeaderBg ?? this.dmHeaderBg, @@ -467,7 +461,6 @@ class DesignVariables extends ThemeExtension { bgSearchInput: Color.lerp(bgSearchInput, other.bgSearchInput, t)!, textMessage: Color.lerp(textMessage, other.textMessage, t)!, channelColorSwatches: ChannelColorSwatches.lerp(channelColorSwatches, other.channelColorSwatches, t), - colorMessageHeaderIconInteractive: Color.lerp(colorMessageHeaderIconInteractive, other.colorMessageHeaderIconInteractive, t)!, contextMenuCancelBg: Color.lerp(contextMenuCancelBg, other.contextMenuCancelBg, t)!, contextMenuCancelPressedBg: Color.lerp(contextMenuCancelPressedBg, other.contextMenuCancelPressedBg, t)!, dmHeaderBg: Color.lerp(dmHeaderBg, other.dmHeaderBg, t)!,