Skip to content

Commit

Permalink
content: Tweak MessageImage size to match web
Browse files Browse the repository at this point in the history
The transparent border mentioned in the removed comment
was treated as external padding to the image but it's
actually inner padding within the gray space.
  • Loading branch information
sirpengi committed Feb 9, 2024
1 parent f73df57 commit c5d5eed
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/widgets/content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -256,20 +256,20 @@ class MessageImage extends StatelessWidget {
child: Padding(
// TODO clean up this padding by imitating web less precisely;
// in particular, avoid adding loose whitespace at end of message.
// The corresponding element on web has a 5px two-sided margin…
// and then a 1px transparent border all around.
padding: const EdgeInsets.fromLTRB(1, 1, 6, 6),
padding: const EdgeInsets.only(right: 5, bottom: 5),
child: ColoredBox(
color: const Color.fromRGBO(0, 0, 0, 0.03),
child: SizedBox(
height: 100,
width: 150,
child: LightboxHero(
message: message,
src: resolvedSrc,
child: RealmContentNetworkImage(
resolvedSrc,
filterQuality: FilterQuality.medium)))))));
child: Padding(
padding: const EdgeInsets.all(1),
child: SizedBox(
height: 100,
width: 150,
child: LightboxHero(
message: message,
src: resolvedSrc,
child: RealmContentNetworkImage(
resolvedSrc,
filterQuality: FilterQuality.medium))))))));
}
}

Expand Down

0 comments on commit c5d5eed

Please sign in to comment.