diff --git a/lib/widgets/attachments/attachment_list.dart b/lib/widgets/attachments/attachment_list.dart index 7ed72c5..ec94f8a 100644 --- a/lib/widgets/attachments/attachment_list.dart +++ b/lib/widgets/attachments/attachment_list.dart @@ -177,9 +177,6 @@ class _AttachmentListState extends State { if (element == null) return const SizedBox.shrink(); double ratio = element.metadata?['ratio']?.toDouble() ?? 16 / 9; return Container( - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surfaceContainerHigh, - ), constraints: BoxConstraints( maxWidth: widget.columnMaxWidth, maxHeight: 640, @@ -247,7 +244,7 @@ class _AttachmentListState extends State { maxHeight: widget.flatMaxHeight, ), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surfaceContainerHigh, + color: Colors.transparent, border: Border.symmetric( horizontal: BorderSide( width: 0.3, @@ -257,6 +254,7 @@ class _AttachmentListState extends State { ), child: CarouselSlider.builder( options: CarouselOptions( + animateToClosest: true, aspectRatio: _aspectRatio, viewportFraction: widget.viewport ?? (widget.attachmentsId.length > 1 ? 0.95 : 1), diff --git a/lib/widgets/posts/post_item.dart b/lib/widgets/posts/post_item.dart index fbef7a6..9fe71ef 100644 --- a/lib/widgets/posts/post_item.dart +++ b/lib/widgets/posts/post_item.dart @@ -117,30 +117,16 @@ class _PostItemState extends State { ), ), ), - if (_contentHeight >= 80 && !widget.isFullContent) - Align( - alignment: Alignment.bottomCenter, - child: IgnorePointer( - child: Container( - height: 80, - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - Theme.of(context).colorScheme.surfaceContainerLow, - Theme.of(context) - .colorScheme - .surface - .withOpacity(0), - ], - ), - ), - ), - ), - ), ], ), + if (_contentHeight >= 80 && !widget.isFullContent) + Opacity( + opacity: 0.8, + child: InkWell(child: Text('readMore'.tr)), + ).paddingOnly( + left: 12, + top: 4, + ), LinkExpansion(content: item.body['content']).paddingOnly( left: 8, right: 8, @@ -225,34 +211,16 @@ class _PostItemState extends State { ), ), ), - if (_contentHeight >= 320 && !widget.isFullContent) - Align( - alignment: Alignment.bottomCenter, - child: IgnorePointer( - child: Container( - height: 320, - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - (widget.backgroundColor ?? - Theme.of(context) - .colorScheme - .surface), - (widget.backgroundColor ?? - Theme.of(context) - .colorScheme - .surface) - .withOpacity(0), - ], - ), - ), - ), - ), - ), ], ), + if (_contentHeight >= 320 && !widget.isFullContent) + Opacity( + opacity: 0.8, + child: InkWell(child: Text('readMore'.tr)), + ).paddingOnly( + left: 12, + top: 4, + ), if (widget.item.replyTo != null && widget.isShowEmbed) Container( constraints: const BoxConstraints(maxWidth: 480), @@ -336,8 +304,7 @@ class _PostItemState extends State { ), closedElevation: 0, openElevation: 0, - closedColor: - widget.backgroundColor ?? Theme.of(context).colorScheme.surface, + closedColor: Colors.transparent, openColor: Theme.of(context).colorScheme.surface, ); } @@ -574,7 +541,7 @@ class _PostEmbedWidget extends StatelessWidget { ), closedElevation: 0, openElevation: 0, - closedColor: Theme.of(context).colorScheme.surface, + closedColor: Colors.transparent, openColor: Theme.of(context).colorScheme.surface, ); }