From b3788b4f05b403b79584f8088e7a600f3bcf40fb Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 23 Jun 2022 15:47:26 -0700 Subject: [PATCH 1/3] Fix Image Width Handling --- lib/widgets/filebubble.dart | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/widgets/filebubble.dart b/lib/widgets/filebubble.dart index e44990eb..71b2ce7c 100644 --- a/lib/widgets/filebubble.dart +++ b/lib/widgets/filebubble.dart @@ -153,6 +153,7 @@ class FileBubbleState extends State { if (Provider.of(context).shouldPreview(path)) { isPreview = true; wdgDecorations = Center( + widthFactor: 1.0, child: MouseRegion( cursor: SystemMouseCursors.click, child: GestureDetector( @@ -223,7 +224,18 @@ class FileBubbleState extends State { crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start, mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start, mainAxisSize: MainAxisSize.min, - children: [wdgSender, isPreview ? Container() : wdgMessage, wdgDecorations, messageStatusWidget]), + children: [ + wdgSender, + isPreview + ? Container( + width: 0, + padding: EdgeInsets.zero, + margin: EdgeInsets.zero, + ) + : wdgMessage, + wdgDecorations, + messageStatusWidget + ]), )); }); } From 9c9916e7c9afb1f2aa9164feb783c74cf95a9c28 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 23 Jun 2022 15:59:25 -0700 Subject: [PATCH 2/3] max height on images --- lib/widgets/filebubble.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/widgets/filebubble.dart b/lib/widgets/filebubble.dart index 71b2ce7c..d6ccbb01 100644 --- a/lib/widgets/filebubble.dart +++ b/lib/widgets/filebubble.dart @@ -1,4 +1,5 @@ import 'dart:io'; +import 'dart:math'; import 'package:cwtch/config.dart'; import 'package:cwtch/models/contact.dart'; @@ -53,7 +54,7 @@ class FileBubbleState extends State { filterQuality: FilterQuality.medium, fit: BoxFit.scaleDown, alignment: Alignment.center, - height: MediaQuery.of(context).size.height * 0.30, + height: min(MediaQuery.of(context).size.height * 0.30, 100), isAntiAlias: false, errorBuilder: (context, error, stackTrace) { return MalformedBubble(); From bf1eece1e2e09dd3a13721b37468ca03a23d1ef1 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 23 Jun 2022 16:00:54 -0700 Subject: [PATCH 3/3] increase max image size --- lib/widgets/filebubble.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/filebubble.dart b/lib/widgets/filebubble.dart index d6ccbb01..b31a5009 100644 --- a/lib/widgets/filebubble.dart +++ b/lib/widgets/filebubble.dart @@ -54,7 +54,7 @@ class FileBubbleState extends State { filterQuality: FilterQuality.medium, fit: BoxFit.scaleDown, alignment: Alignment.center, - height: min(MediaQuery.of(context).size.height * 0.30, 100), + height: min(MediaQuery.of(context).size.height * 0.30, 150), isAntiAlias: false, errorBuilder: (context, error, stackTrace) { return MalformedBubble();