Fixup Debug Mode Overlaps
continuous-integration/drone/pr Build is pending Details

This commit is contained in:
Sarah Jamie Lewis 2024-02-09 15:54:19 -08:00
parent 8acefb8b0b
commit e4b2e7936f
3 changed files with 23 additions and 21 deletions

View File

@ -68,8 +68,8 @@ class FileMessage extends Message {
padding: EdgeInsets.all(1.0),
decoration: BoxDecoration(),
clipBehavior: Clip.antiAliasWithSaveLayer,
width: 100,
height: 50,
constraints: BoxConstraints(minHeight: 50, maxHeight: 50, minWidth: 50, maxWidth: 300),
alignment: Alignment.centerLeft,
child: FileBubble(
nameSuggestion,
rootHash,

View File

@ -52,20 +52,21 @@ class FileBubbleState extends State<FileBubble> {
}
Widget getPreview(context) {
return Image.file(
myFile!,
// limit the amount of space the image can decode too, we keep this high-ish to allow quality previews...
cacheWidth: 1024,
cacheHeight: 1024,
filterQuality: FilterQuality.medium,
fit: BoxFit.scaleDown,
alignment: Alignment.center,
height: min(MediaQuery.of(context).size.height * 0.30, 150),
isAntiAlias: false,
errorBuilder: (context, error, stackTrace) {
return MalformedBubble();
},
);
return Container(
constraints: BoxConstraints(maxHeight: min(MediaQuery.of(context).size.height, 150)),
child: Image.file(
myFile!,
// limit the amount of space the image can decode too, we keep this high-ish to allow quality previews...
cacheWidth: 1024,
cacheHeight: 1024,
filterQuality: FilterQuality.medium,
fit: BoxFit.scaleDown,
alignment: Alignment.center,
isAntiAlias: false,
errorBuilder: (context, error, stackTrace) {
return MalformedBubble();
},
));
}
@override
@ -392,7 +393,7 @@ class FileBubbleState extends State<FileBubble> {
title: Text(meta),
trailing: IconButton(
icon: Icon(Icons.close),
color: Provider.of<Settings>(bcontext, listen: false).theme.toolbarIconColor,
color: Provider.of<Settings>(bcontext, listen: false).theme.mainTextColor,
iconSize: 32,
onPressed: () {
Navigator.pop(bcontext, true);

View File

@ -92,17 +92,18 @@ class QuotedMessageBubbleState extends State<QuotedMessageBubble> {
child: Container(
margin: EdgeInsets.all(5),
padding: EdgeInsets.all(5),
clipBehavior: Clip.antiAlias,
clipBehavior: Clip.antiAliasWithSaveLayer,
decoration: BoxDecoration(
color: fromMe ? Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor : Provider.of<Settings>(context).theme.messageFromMeBackgroundColor,
),
height: 75,
child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [
Align(alignment: Alignment.centerLeft, child: wdgReplyingTo),
Row(mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [
Flexible(
child: Row(mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [
Padding(padding: EdgeInsets.symmetric(vertical: 5.0, horizontal: 10.0), child: Icon(Icons.reply, size: 32, color: qTextColor)),
IntrinsicWidth(child: qMessage.getPreviewWidget(context)),
])
Flexible(child: IntrinsicWidth(child: qMessage.getPreviewWidget(context))),
]))
])),
),
);