diff --git a/lib/pages/chat/chat_app_bar_list_tile.dart b/lib/pages/chat/chat_app_bar_list_tile.dart index 1ca0c5fba..a1fc21b43 100644 --- a/lib/pages/chat/chat_app_bar_list_tile.dart +++ b/lib/pages/chat/chat_app_bar_list_tile.dart @@ -37,6 +37,7 @@ class ChatAppBarListTile extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 4.0), child: Linkify( text: title, + textScaleFactor: MediaQuery.textScalerOf(context).scale(1), options: const LinkifyOptions(humanize: false), maxLines: 1, overflow: TextOverflow.ellipsis, diff --git a/lib/pages/chat/events/audio_player.dart b/lib/pages/chat/events/audio_player.dart index 8efcc190a..41e1f8606 100644 --- a/lib/pages/chat/events/audio_player.dart +++ b/lib/pages/chat/events/audio_player.dart @@ -397,6 +397,7 @@ class AudioPlayerState extends State { const SizedBox(height: 8), Linkify( text: fileDescription, + textScaleFactor: MediaQuery.textScalerOf(context).scale(1), style: TextStyle( color: widget.color, fontSize: widget.fontSize, @@ -420,6 +421,7 @@ class AudioPlayerState extends State { /// To use a MatrixFile as an AudioSource for the just_audio package class MatrixFileAudioSource extends StreamAudioSource { final MatrixFile file; + MatrixFileAudioSource(this.file); @override diff --git a/lib/pages/chat/events/image_bubble.dart b/lib/pages/chat/events/image_bubble.dart index 3fa352d25..4a77af18f 100644 --- a/lib/pages/chat/events/image_bubble.dart +++ b/lib/pages/chat/events/image_bubble.dart @@ -124,6 +124,7 @@ class ImageBubble extends StatelessWidget { width: width, child: Linkify( text: fileDescription, + textScaleFactor: MediaQuery.textScalerOf(context).scale(1), style: TextStyle( color: textColor, fontSize: AppConfig.fontSizeFactor * AppConfig.messageFontSize, diff --git a/lib/pages/chat/events/message_content.dart b/lib/pages/chat/events/message_content.dart index 40e237abd..2df156bbc 100644 --- a/lib/pages/chat/events/message_content.dart +++ b/lib/pages/chat/events/message_content.dart @@ -281,6 +281,7 @@ class MessageContent extends StatelessWidget { MatrixLocals(L10n.of(context)), hideReply: true, ), + textScaleFactor: MediaQuery.textScalerOf(context).scale(1), style: TextStyle( color: textColor, fontSize: bigEmotes ? fontSize * 5 : fontSize, diff --git a/lib/pages/chat/events/message_download_content.dart b/lib/pages/chat/events/message_download_content.dart index b759895ef..31a5c0708 100644 --- a/lib/pages/chat/events/message_download_content.dart +++ b/lib/pages/chat/events/message_download_content.dart @@ -94,6 +94,7 @@ class MessageDownloadContent extends StatelessWidget { if (fileDescription != null) Linkify( text: fileDescription, + textScaleFactor: MediaQuery.textScalerOf(context).scale(1), style: TextStyle( color: textColor, fontSize: AppConfig.fontSizeFactor * AppConfig.messageFontSize, diff --git a/lib/pages/chat/events/video_player.dart b/lib/pages/chat/events/video_player.dart index 5cb5cf913..13f860609 100644 --- a/lib/pages/chat/events/video_player.dart +++ b/lib/pages/chat/events/video_player.dart @@ -25,6 +25,7 @@ class EventVideoPlayer extends StatefulWidget { final Event event; final Color? textColor; final Color? linkColor; + const EventVideoPlayer( this.event, { this.textColor, @@ -190,6 +191,7 @@ class EventVideoPlayerState extends State { width: width, child: Linkify( text: fileDescription, + textScaleFactor: MediaQuery.textScalerOf(context).scale(1), style: TextStyle( color: textColor, fontSize: AppConfig.fontSizeFactor * AppConfig.messageFontSize, diff --git a/lib/pages/chat_details/chat_details_view.dart b/lib/pages/chat_details/chat_details_view.dart index e96c10d82..a5c724e7a 100644 --- a/lib/pages/chat_details/chat_details_view.dart +++ b/lib/pages/chat_details/chat_details_view.dart @@ -243,6 +243,8 @@ class ChatDetailsView extends StatelessWidget { text: room.topic.isEmpty ? L10n.of(context).noChatDescriptionYet : room.topic, + textScaleFactor: + MediaQuery.textScalerOf(context).scale(1), options: const LinkifyOptions(humanize: false), linkStyle: const TextStyle( color: Colors.blueAccent, diff --git a/lib/pages/chat_search/chat_search_message_tab.dart b/lib/pages/chat_search/chat_search_message_tab.dart index 7c7024e8d..18d6de4a0 100644 --- a/lib/pages/chat_search/chat_search_message_tab.dart +++ b/lib/pages/chat_search/chat_search_message_tab.dart @@ -152,6 +152,7 @@ class _MessageSearchResultListTile extends StatelessWidget { ], ), subtitle: Linkify( + textScaleFactor: MediaQuery.textScalerOf(context).scale(1), options: const LinkifyOptions(humanize: false), linkStyle: TextStyle( color: theme.colorScheme.primary, diff --git a/lib/pages/homeserver_picker/homeserver_picker_view.dart b/lib/pages/homeserver_picker/homeserver_picker_view.dart index e4782b35f..df3b69489 100644 --- a/lib/pages/homeserver_picker/homeserver_picker_view.dart +++ b/lib/pages/homeserver_picker/homeserver_picker_view.dart @@ -122,6 +122,8 @@ class HomeserverPickerView extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 32.0), child: SelectableLinkify( text: L10n.of(context).appIntroduction, + textScaleFactor: + MediaQuery.textScalerOf(context).scale(1), textAlign: TextAlign.center, linkStyle: TextStyle( color: theme.colorScheme.secondary, @@ -169,6 +171,19 @@ class HomeserverPickerView extends StatelessWidget { content: Linkify( text: L10n.of(context) .homeserverDescription, + textScaleFactor: + MediaQuery.textScalerOf(context) + .scale(1), + options: const LinkifyOptions( + humanize: false, + ), + linkStyle: TextStyle( + color: theme.colorScheme.primary, + decorationColor: + theme.colorScheme.primary, + ), + onOpen: (link) => + launchUrlString(link.url), ), actions: [ AdaptiveDialogAction( diff --git a/lib/pages/settings_homeserver/settings_homeserver_view.dart b/lib/pages/settings_homeserver/settings_homeserver_view.dart index 6de7102e8..c75f88508 100644 --- a/lib/pages/settings_homeserver/settings_homeserver_view.dart +++ b/lib/pages/settings_homeserver/settings_homeserver_view.dart @@ -169,6 +169,8 @@ class SettingsHomeserverView extends StatelessWidget { title: const Text('Federation Base URL'), subtitle: Linkify( text: data.federationBaseUrl.toString(), + textScaleFactor: + MediaQuery.textScalerOf(context).scale(1), options: const LinkifyOptions(humanize: false), linkStyle: TextStyle( color: theme.colorScheme.primary, @@ -231,6 +233,8 @@ class SettingsHomeserverView extends StatelessWidget { title: const Text('Base URL'), subtitle: Linkify( text: wellKnown.mHomeserver.baseUrl.toString(), + textScaleFactor: + MediaQuery.textScalerOf(context).scale(1), options: const LinkifyOptions(humanize: false), linkStyle: TextStyle( color: theme.colorScheme.primary, @@ -244,6 +248,8 @@ class SettingsHomeserverView extends StatelessWidget { title: const Text('Identity Server:'), subtitle: Linkify( text: identityServer.baseUrl.toString(), + textScaleFactor: + MediaQuery.textScalerOf(context).scale(1), options: const LinkifyOptions(humanize: false), linkStyle: TextStyle( color: theme.colorScheme.primary, diff --git a/lib/widgets/adaptive_dialogs/public_room_dialog.dart b/lib/widgets/adaptive_dialogs/public_room_dialog.dart index ded3fb077..4f0070ffd 100644 --- a/lib/widgets/adaptive_dialogs/public_room_dialog.dart +++ b/lib/widgets/adaptive_dialogs/public_room_dialog.dart @@ -1,11 +1,12 @@ -import 'package:fluffychat/widgets/adaptive_dialogs/show_ok_cancel_alert_dialog.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_linkify/flutter_linkify.dart'; import 'package:go_router/go_router.dart'; import 'package:matrix/matrix.dart'; +import 'package:fluffychat/widgets/adaptive_dialogs/show_ok_cancel_alert_dialog.dart'; import '../../config/themes.dart'; import '../../utils/url_launcher.dart'; import '../avatar.dart'; @@ -188,6 +189,8 @@ class PublicRoomDialog extends StatelessWidget { if (topic != null && topic.isNotEmpty) SelectableLinkify( text: topic, + textScaleFactor: + MediaQuery.textScalerOf(context).scale(1), textAlign: TextAlign.center, options: const LinkifyOptions(humanize: false), linkStyle: TextStyle( diff --git a/lib/widgets/adaptive_dialogs/show_ok_cancel_alert_dialog.dart b/lib/widgets/adaptive_dialogs/show_ok_cancel_alert_dialog.dart index 8c2f861e4..585524d2c 100644 --- a/lib/widgets/adaptive_dialogs/show_ok_cancel_alert_dialog.dart +++ b/lib/widgets/adaptive_dialogs/show_ok_cancel_alert_dialog.dart @@ -31,6 +31,7 @@ Future showOkCancelAlertDialog({ ? null : SelectableLinkify( text: message, + textScaleFactor: MediaQuery.textScalerOf(context).scale(1), linkStyle: TextStyle( color: Theme.of(context).colorScheme.primary, decorationColor: Theme.of(context).colorScheme.primary, @@ -81,6 +82,7 @@ Future showOkAlertDialog({ ? null : SelectableLinkify( text: message, + textScaleFactor: MediaQuery.textScalerOf(context).scale(1), linkStyle: TextStyle( color: Theme.of(context).colorScheme.primary, decorationColor: Theme.of(context).colorScheme.primary, diff --git a/lib/widgets/adaptive_dialogs/show_text_input_dialog.dart b/lib/widgets/adaptive_dialogs/show_text_input_dialog.dart index 4ad5ea3f0..bbfe28a18 100644 --- a/lib/widgets/adaptive_dialogs/show_text_input_dialog.dart +++ b/lib/widgets/adaptive_dialogs/show_text_input_dialog.dart @@ -49,6 +49,7 @@ Future showTextInputDialog({ if (message != null) SelectableLinkify( text: message, + textScaleFactor: MediaQuery.textScalerOf(context).scale(1), linkStyle: TextStyle( color: Theme.of(context).colorScheme.primary, decorationColor: Theme.of(context).colorScheme.primary, diff --git a/lib/widgets/adaptive_dialogs/user_dialog.dart b/lib/widgets/adaptive_dialogs/user_dialog.dart index 3c7281fb9..bc6881ac6 100644 --- a/lib/widgets/adaptive_dialogs/user_dialog.dart +++ b/lib/widgets/adaptive_dialogs/user_dialog.dart @@ -144,6 +144,8 @@ class UserDialog extends StatelessWidget { if (statusMsg != null) SelectableLinkify( text: statusMsg, + textScaleFactor: + MediaQuery.textScalerOf(context).scale(1), textAlign: TextAlign.center, options: const LinkifyOptions(humanize: false), linkStyle: TextStyle(