diff --git a/lib/pages/chat/events/encrypted_content.dart b/lib/pages/chat/events/encrypted_content.dart index bf8ea2caac..dd8dfbaa3c 100644 --- a/lib/pages/chat/events/encrypted_content.dart +++ b/lib/pages/chat/events/encrypted_content.dart @@ -34,12 +34,17 @@ class EncryptedContent extends StatelessWidget with EncryptedMixin { ), ), const SizedBox(width: EncryptedContentStyle.leadingAndTextGap), - Text( - maxLines: 2, - L10n.of(context)!.thisMessageHasBeenEncrypted, - style: Theme.of(context).textTheme.bodyMedium!.copyWith( - color: Theme.of(context).colorScheme.onSurface, - ), + Container( + constraints: const BoxConstraints( + maxWidth: EncryptedContentStyle.textMaxWidth, + ), + child: Text( + maxLines: 2, + L10n.of(context)!.thisMessageHasBeenEncrypted, + style: Theme.of(context).textTheme.bodyMedium!.copyWith( + color: Theme.of(context).colorScheme.onSurface, + ), + ), ), ], ), diff --git a/lib/pages/chat/events/encrypted_content_style.dart b/lib/pages/chat/events/encrypted_content_style.dart index df12583505..cbde22376f 100644 --- a/lib/pages/chat/events/encrypted_content_style.dart +++ b/lib/pages/chat/events/encrypted_content_style.dart @@ -3,9 +3,9 @@ import 'package:flutter/material.dart'; class EncryptedContentStyle { static const EdgeInsets parentPadding = EdgeInsets.symmetric( horizontal: 8, - vertical: 6, ); static const EdgeInsets leadingIconPadding = EdgeInsets.all(5); static const double leadingIconSize = 20; static const double leadingAndTextGap = 8; + static const double textMaxWidth = 165; }