Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak dark theme #1213

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/widgets/message_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ class MessageListAppBarTitle extends StatelessWidget {
padding: const EdgeInsetsDirectional.only(start: 4),
Gaurav-Kushwaha-1225 marked this conversation as resolved.
Show resolved Hide resolved
child: Icon(icon,
// TODO(design) copies the recipient header in web; is there a better color?
Gaurav-Kushwaha-1225 marked this conversation as resolved.
Show resolved Hide resolved
color: designVariables.colorMessageHeaderIconInteractive, size: 14)),
color: designVariables.title, size: 14)),
]);
}

Expand Down Expand Up @@ -1091,7 +1091,7 @@ class StreamMessageRecipientHeader extends StatelessWidget {
style: recipientHeaderTextStyle(context))),
const SizedBox(width: 4),
// TODO(design) copies the recipient header in web; is there a better color?
Gaurav-Kushwaha-1225 marked this conversation as resolved.
Show resolved Hide resolved
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))),
Expand Down
7 changes: 0 additions & 7 deletions lib/widgets/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
bgSearchInput: const Color(0xffe3e3e3),
textMessage: const Color(0xff262626),
channelColorSwatches: ChannelColorSwatches.light,
colorMessageHeaderIconInteractive: Colors.black.withValues(alpha: 0.2),
Gaurav-Kushwaha-1225 marked this conversation as resolved.
Show resolved Hide resolved
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(),
Expand Down Expand Up @@ -199,7 +198,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
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),
Expand Down Expand Up @@ -253,7 +251,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
required this.bgSearchInput,
required this.textMessage,
required this.channelColorSwatches,
required this.colorMessageHeaderIconInteractive,
required this.contextMenuCancelBg,
required this.contextMenuCancelPressedBg,
required this.dmHeaderBg,
Expand Down Expand Up @@ -315,7 +312,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
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;
Expand Down Expand Up @@ -364,7 +360,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
Color? bgSearchInput,
Color? textMessage,
ChannelColorSwatches? channelColorSwatches,
Color? colorMessageHeaderIconInteractive,
Color? contextMenuCancelBg,
Color? contextMenuCancelPressedBg,
Color? dmHeaderBg,
Expand Down Expand Up @@ -412,7 +407,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
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,
Expand Down Expand Up @@ -467,7 +461,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
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)!,
Expand Down