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');
|
?.tryGet<int>('h');
|
||||||
var width = maxSize;
|
var width = maxSize;
|
||||||
var height = maxSize;
|
var height = maxSize;
|
||||||
var fit = BoxFit.cover;
|
var fit = event.messageType == MessageTypes.Sticker
|
||||||
|
? BoxFit.contain
|
||||||
|
: BoxFit.cover;
|
||||||
if (w != null && h != null) {
|
if (w != null && h != null) {
|
||||||
fit = BoxFit.contain;
|
fit = BoxFit.contain;
|
||||||
if (w > h) {
|
if (w > h) {
|
||||||
|
|
|
||||||
|
|
@ -151,8 +151,11 @@ class _MxcImageState extends State<MxcImage> {
|
||||||
|
|
||||||
Widget placeholder(BuildContext context) =>
|
Widget placeholder(BuildContext context) =>
|
||||||
widget.placeholder?.call(context) ??
|
widget.placeholder?.call(context) ??
|
||||||
const Center(
|
Container(
|
||||||
child: CircularProgressIndicator.adaptive(strokeWidth: 2),
|
width: widget.width,
|
||||||
|
height: widget.height,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: const CircularProgressIndicator.adaptive(strokeWidth: 2),
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue