chore: Follow up sticker design

This commit is contained in:
krille-chan 2024-03-30 08:37:24 +01:00
parent 3c532f90ba
commit c51fc600a2
No known key found for this signature in database
2 changed files with 8 additions and 3 deletions

View file

@ -118,7 +118,9 @@ class MessageContent extends StatelessWidget {
?.tryGet<int>('h');
var width = maxSize;
var height = maxSize;
var fit = BoxFit.cover;
var fit = event.messageType == MessageTypes.Sticker
? BoxFit.contain
: BoxFit.cover;
if (w != null && h != null) {
fit = BoxFit.contain;
if (w > h) {

View file

@ -151,8 +151,11 @@ class _MxcImageState extends State<MxcImage> {
Widget placeholder(BuildContext context) =>
widget.placeholder?.call(context) ??
const Center(
child: CircularProgressIndicator.adaptive(strokeWidth: 2),
Container(
width: widget.width,
height: widget.height,
alignment: Alignment.center,
child: const CircularProgressIndicator.adaptive(strokeWidth: 2),
);
@override