chore: Follow up sticker design
This commit is contained in:
parent
3c532f90ba
commit
c51fc600a2
2 changed files with 8 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue