Skip to content

Commit

Permalink
chore: Improve read marker design
Browse files Browse the repository at this point in the history
  • Loading branch information
krille-chan committed Oct 11, 2024
1 parent a2cc1bc commit 694bc48
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
29 changes: 18 additions & 11 deletions lib/pages/chat/events/message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ class Message extends StatelessWidget {
return Text(
displayname,
style: TextStyle(
fontSize: 12,
fontSize: 11,
fontWeight: FontWeight.bold,
color: (theme.brightness ==
Brightness.light
? displayname.color
Expand Down Expand Up @@ -469,27 +470,33 @@ class Message extends StatelessWidget {
Row(
children: [
Expanded(
child: Divider(color: theme.colorScheme.primary),
child: Divider(color: theme.colorScheme.secondary),
),
Container(
decoration: BoxDecoration(
border: Border.all(
color: theme.colorScheme.primary,
),
color: theme.colorScheme.primaryContainer,
borderRadius: BorderRadius.circular(4),
margin: const EdgeInsets.symmetric(
horizontal: 4,
vertical: 16.0,
),
margin: const EdgeInsets.all(8.0),
padding: const EdgeInsets.symmetric(
horizontal: 8,
),
child: Text(
L10n.of(context).readUpToHere,
style: TextStyle(color: theme.colorScheme.primary),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12 * AppConfig.fontSizeFactor,
color: theme.colorScheme.secondary,
shadows: [
Shadow(
color: theme.colorScheme.surface,
blurRadius: 3,
),
],
),
),
),
Expanded(
child: Divider(color: theme.colorScheme.primary),
child: Divider(color: theme.colorScheme.secondary),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/string_color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension StringColor on String {

Color get color {
_colorCache[this] ??= {};
return _colorCache[this]![0.35] ??= _getColorLight(0.35);
return _colorCache[this]![0.3] ??= _getColorLight(0.3);
}

Color get darkColor {
Expand Down

0 comments on commit 694bc48

Please sign in to comment.