chore: update reply and link text styling (#1708)

pull/1593/head
ggurdin 9 months ago committed by GitHub
parent 72dcdb4fd5
commit 0cce17d27b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -165,11 +165,14 @@ class Message extends StatelessWidget {
// Pangea#
: theme.colorScheme.onSurface;
final linkColor = ownMessage
? theme.brightness == Brightness.light
? theme.colorScheme.primaryFixed
: theme.colorScheme.onTertiaryContainer
: theme.colorScheme.primary;
// #Pangea
// final linkColor = ownMessage
// ? theme.brightness == Brightness.light
// ? theme.colorScheme.primaryFixed
// : theme.colorScheme.onTertiaryContainer
// : theme.colorScheme.primary;
final linkColor = theme.colorScheme.primary;
// Pangea#
final rowMainAxisAlignment =
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;

@ -67,7 +67,10 @@ class ReplyContent extends StatelessWidget {
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.bold,
color: color,
// #Pangea
// color: color,
color: theme.colorScheme.onSurface,
// Pangea#
fontSize: fontSize,
),
);
@ -82,11 +85,16 @@ class ReplyContent extends StatelessWidget {
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: theme.brightness == Brightness.dark
? theme.colorScheme.onSurface
: ownMessage
? theme.colorScheme.onTertiary
: theme.colorScheme.onSurface,
// #Pangea
// color: theme.brightness == Brightness.dark
// ? theme.colorScheme.onSurface
// : ownMessage
// ? theme.colorScheme.onTertiary
// : theme.colorScheme.onSurface,
color: ownMessage
? ThemeData.dark().colorScheme.onPrimary
: theme.colorScheme.onSurface,
// Pangea#
fontSize: fontSize,
),
),

@ -120,10 +120,7 @@ class ActivityPlanMessage extends StatelessWidget {
controller: controller,
immersionMode: false,
timeline: timeline,
linkColor: theme.brightness ==
Brightness.light
? theme.colorScheme.primaryFixed
: theme.colorScheme.onTertiaryContainer,
linkColor: theme.colorScheme.primary,
),
if (event.hasAggregatedEvents(
timeline,

@ -205,14 +205,7 @@ class MessageAudioCardState extends State<MessageAudioCard> {
chatController:
widget.overlayController.widget.chatController,
overlayController: widget.overlayController,
linkColor: widget.messageEvent.senderId ==
widget.messageEvent.event.room.client.userID
? Theme.of(context).brightness == Brightness.light
? Theme.of(context).colorScheme.primaryFixed
: Theme.of(context)
.colorScheme
.onTertiaryContainer
: Theme.of(context).colorScheme.primary,
linkColor: Theme.of(context).colorScheme.primary,
)
: const CardErrorWidget(
error: "Null audio file in message_audio_card",

@ -233,8 +233,9 @@ class MessageTextWidget extends StatelessWidget {
backgroundColor: backgroundColor,
),
),
linkStyle: const TextStyle(
linkStyle: TextStyle(
decoration: TextDecoration.underline,
color: Theme.of(context).colorScheme.primary,
),
onOpen: (url) => UrlLauncher(context, url.url).launchUrl(),
);
@ -255,8 +256,9 @@ class MessageTextWidget extends StatelessWidget {
text: substring,
style: style,
options: const LinkifyOptions(humanize: false),
linkStyle: const TextStyle(
linkStyle: TextStyle(
decoration: TextDecoration.underline,
color: Theme.of(context).colorScheme.primary,
),
onOpen: (url) => UrlLauncher(context, url.url).launchUrl(),
);

@ -190,11 +190,7 @@ class OverlayMessage extends StatelessWidget {
prevEvent: prevEvent,
borderRadius: borderRadius,
timeline: timeline,
linkColor: ownMessage
? theme.brightness == Brightness.light
? theme.colorScheme.primaryFixed
: theme.colorScheme.onTertiaryContainer
: theme.colorScheme.primary,
linkColor: theme.colorScheme.primary,
),
if (event.hasAggregatedEvents(
timeline,

Loading…
Cancel
Save