-
Notifications
You must be signed in to change notification settings - Fork 248
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
base: main
Are you sure you want to change the base?
Tweak dark theme #1213
Changes from 1 commit
5e8d0a8
fc75907
28fbba2
4053f84
4b5405d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> { | |
dateSeparator: Colors.black, | ||
labelTime: const HSLColor.fromAHSL(0.49, 0, 0, 0).toColor(), | ||
dmRecipientHeaderBg: const HSLColor.fromAHSL(1, 46, 0.35, 0.93).toColor(), | ||
recipientHeaderText: const HSLColor.fromAHSL(1, 0, 0, 0.15).toColor(), | ||
senderBotIcon: const HSLColor.fromAHSL(1, 180, 0.08, 0.65).toColor(), | ||
senderName: const HSLColor.fromAHSL(1, 0, 0, 0.2).toColor(), | ||
streamMessageBgDefault: Colors.white, | ||
streamRecipientHeaderChevronRight: Colors.black.withValues(alpha: 0.3), | ||
|
||
|
@@ -57,9 +55,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> { | |
dateSeparator: Colors.white.withValues(alpha: 51), | ||
labelTime: const HSLColor.fromAHSL(0.5, 0, 0, 1).toColor(), | ||
dmRecipientHeaderBg: const HSLColor.fromAHSL(1, 0, 0, 0.14).toColor(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you identify where this color ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
recipientHeaderText: const HSLColor.fromAHSL(0.9, 0, 0, 1).toColor(), | ||
senderBotIcon: const HSLColor.fromAHSL(1, 180, 0.05, 0.5).toColor(), | ||
senderName: const HSLColor.fromAHSL(0.9, 0, 0, 1).toColor(), | ||
streamMessageBgDefault: const HSLColor.fromAHSL(1, 0, 0, 0.11).toColor(), | ||
streamRecipientHeaderChevronRight: Colors.white.withValues(alpha: 0.3), | ||
|
||
|
@@ -80,9 +76,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> { | |
required this.dateSeparator, | ||
required this.labelTime, | ||
required this.dmRecipientHeaderBg, | ||
required this.recipientHeaderText, | ||
required this.senderBotIcon, | ||
required this.senderName, | ||
required this.streamMessageBgDefault, | ||
required this.streamRecipientHeaderChevronRight, | ||
required this.unreadMarker, | ||
|
@@ -103,9 +97,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> { | |
final Color dateSeparator; | ||
final Color labelTime; | ||
final Color dmRecipientHeaderBg; | ||
final Color recipientHeaderText; | ||
final Color senderBotIcon; | ||
final Color senderName; | ||
final Color streamMessageBgDefault; | ||
final Color streamRecipientHeaderChevronRight; | ||
final Color unreadMarker; | ||
|
@@ -117,9 +109,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> { | |
Color? dateSeparator, | ||
Color? labelTime, | ||
Color? dmRecipientHeaderBg, | ||
Color? recipientHeaderText, | ||
Color? senderBotIcon, | ||
Color? senderName, | ||
Color? streamMessageBgDefault, | ||
Color? streamRecipientHeaderChevronRight, | ||
Color? unreadMarker, | ||
|
@@ -130,9 +120,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> { | |
dateSeparator: dateSeparator ?? this.dateSeparator, | ||
labelTime: labelTime ?? this.labelTime, | ||
dmRecipientHeaderBg: dmRecipientHeaderBg ?? this.dmRecipientHeaderBg, | ||
recipientHeaderText: recipientHeaderText ?? this.recipientHeaderText, | ||
senderBotIcon: senderBotIcon ?? this.senderBotIcon, | ||
senderName: senderName ?? this.senderName, | ||
streamMessageBgDefault: streamMessageBgDefault ?? this.streamMessageBgDefault, | ||
streamRecipientHeaderChevronRight: streamRecipientHeaderChevronRight ?? this.streamRecipientHeaderChevronRight, | ||
unreadMarker: unreadMarker ?? this.unreadMarker, | ||
|
@@ -150,9 +138,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> { | |
dateSeparator: Color.lerp(dateSeparator, other.dateSeparator, t)!, | ||
labelTime: Color.lerp(labelTime, other.labelTime, t)!, | ||
dmRecipientHeaderBg: Color.lerp(streamMessageBgDefault, other.dmRecipientHeaderBg, t)!, | ||
recipientHeaderText: Color.lerp(recipientHeaderText, other.recipientHeaderText, t)!, | ||
senderBotIcon: Color.lerp(senderBotIcon, other.senderBotIcon, t)!, | ||
senderName: Color.lerp(senderName, other.senderName, t)!, | ||
streamMessageBgDefault: Color.lerp(streamMessageBgDefault, other.streamMessageBgDefault, t)!, | ||
streamRecipientHeaderChevronRight: Color.lerp(streamRecipientHeaderChevronRight, other.streamRecipientHeaderChevronRight, t)!, | ||
unreadMarker: Color.lerp(unreadMarker, other.unreadMarker, t)!, | ||
|
@@ -1034,7 +1020,7 @@ class StreamMessageRecipientHeader extends StatelessWidget { | |
iconColor = swatch.iconOnBarBackground; | ||
} else { | ||
backgroundColor = messageListTheme.unsubscribedStreamRecipientHeaderBg; | ||
iconColor = messageListTheme.recipientHeaderText; | ||
iconColor = designVariables.title; | ||
} | ||
|
||
final Widget streamWidget; | ||
|
@@ -1140,6 +1126,7 @@ class DmRecipientHeader extends StatelessWidget { | |
} | ||
|
||
final messageListTheme = MessageListTheme.of(context); | ||
final designVariables = DesignVariables.of(context); | ||
|
||
return GestureDetector( | ||
onTap: () => Navigator.push(context, | ||
|
@@ -1155,7 +1142,7 @@ class DmRecipientHeader extends StatelessWidget { | |
Padding( | ||
padding: const EdgeInsets.symmetric(horizontal: 6), | ||
child: Icon( | ||
color: messageListTheme.recipientHeaderText, | ||
color: designVariables.title, | ||
size: 16, | ||
ZulipIcons.user)), | ||
Expanded( | ||
|
@@ -1169,7 +1156,7 @@ class DmRecipientHeader extends StatelessWidget { | |
|
||
TextStyle recipientHeaderTextStyle(BuildContext context) { | ||
return TextStyle( | ||
color: MessageListTheme.of(context).recipientHeaderText, | ||
color: DesignVariables.of(context).title, | ||
fontSize: 16, | ||
letterSpacing: proportionalLetterSpacing(context, 0.02, baseFontSize: 16), | ||
height: (18 / 16), | ||
|
@@ -1305,7 +1292,7 @@ class MessageWithPossibleSender extends StatelessWidget { | |
style: TextStyle( | ||
fontSize: 18, | ||
height: (22 / 18), | ||
color: messageListTheme.senderName, | ||
color: designVariables.title, | ||
).merge(weightVariableTextStyle(context, wght: 600)), | ||
overflow: TextOverflow.ellipsis)), | ||
if (sender?.isBot ?? false) ...[ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit message nit: similarly, mentioning
title
in the commit summary is helpfulThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't get why you are saying to add
title
in this commit message.This commit message as you have mentioned above is fine for this commit.
Please correct me if I didn't understand properly at any place.