chore: Nicer colors for reactions
This commit is contained in:
parent
dfe6717a29
commit
9ea7d307c2
1 changed files with 5 additions and 8 deletions
|
|
@ -4,6 +4,7 @@ import 'package:collection/collection.dart' show IterableExtension;
|
||||||
import 'package:matrix/matrix.dart';
|
import 'package:matrix/matrix.dart';
|
||||||
|
|
||||||
import 'package:fluffychat/config/app_config.dart';
|
import 'package:fluffychat/config/app_config.dart';
|
||||||
|
import 'package:fluffychat/config/themes.dart';
|
||||||
import 'package:fluffychat/widgets/avatar.dart';
|
import 'package:fluffychat/widgets/avatar.dart';
|
||||||
import 'package:fluffychat/widgets/future_loading_dialog.dart';
|
import 'package:fluffychat/widgets/future_loading_dialog.dart';
|
||||||
import 'package:fluffychat/widgets/matrix.dart';
|
import 'package:fluffychat/widgets/matrix.dart';
|
||||||
|
|
@ -111,7 +112,9 @@ class _Reaction extends StatelessWidget {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
final textColor =
|
final textColor =
|
||||||
theme.brightness == Brightness.dark ? Colors.white : Colors.black;
|
theme.brightness == Brightness.dark ? Colors.white : Colors.black;
|
||||||
final color = theme.colorScheme.surface;
|
final color = reacted == true
|
||||||
|
? theme.bubbleColor
|
||||||
|
: theme.colorScheme.surfaceContainerHigh;
|
||||||
Widget content;
|
Widget content;
|
||||||
if (reactionKey.startsWith('mxc://')) {
|
if (reactionKey.startsWith('mxc://')) {
|
||||||
content = Row(
|
content = Row(
|
||||||
|
|
@ -144,7 +147,7 @@ class _Reaction extends StatelessWidget {
|
||||||
content = Text(
|
content = Text(
|
||||||
renderKey.toString() + (count > 1 ? ' $count' : ''),
|
renderKey.toString() + (count > 1 ? ' $count' : ''),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: textColor,
|
color: reacted == true ? theme.onBubbleColor : textColor,
|
||||||
fontSize: DefaultTextStyle.of(context).style.fontSize,
|
fontSize: DefaultTextStyle.of(context).style.fontSize,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -156,12 +159,6 @@ class _Reaction extends StatelessWidget {
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: color,
|
color: color,
|
||||||
border: Border.all(
|
|
||||||
width: 1,
|
|
||||||
color: reacted!
|
|
||||||
? theme.colorScheme.primary
|
|
||||||
: theme.colorScheme.primaryContainer,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius / 2),
|
borderRadius: BorderRadius.circular(AppConfig.borderRadius / 2),
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2),
|
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue