fix: Text scale factor in Linkify widgets
Signed-off-by: Krille <c.kussowski@famedly.com>
This commit is contained in:
parent
a1223c0e9b
commit
60fe90233b
14 changed files with 41 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -397,6 +397,7 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
|
|||
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<AudioPlayerWidget> {
|
|||
/// To use a MatrixFile as an AudioSource for the just_audio package
|
||||
class MatrixFileAudioSource extends StreamAudioSource {
|
||||
final MatrixFile file;
|
||||
|
||||
MatrixFileAudioSource(this.file);
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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<EventVideoPlayer> {
|
|||
width: width,
|
||||
child: Linkify(
|
||||
text: fileDescription,
|
||||
textScaleFactor: MediaQuery.textScalerOf(context).scale(1),
|
||||
style: TextStyle(
|
||||
color: textColor,
|
||||
fontSize: AppConfig.fontSizeFactor * AppConfig.messageFontSize,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue