From 8219b75cf4ba640c2808402c9f6964509afc0f26 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 31 Jul 2022 09:36:45 +0200 Subject: [PATCH] neon: Round feed icons --- .../neon/lib/src/apps/news/widgets/articles_view.dart | 1 + packages/neon/lib/src/apps/news/widgets/feed_icon.dart | 9 +++++++-- packages/neon/lib/src/apps/news/widgets/feeds_view.dart | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/neon/lib/src/apps/news/widgets/articles_view.dart b/packages/neon/lib/src/apps/news/widgets/articles_view.dart index 2f3adecb..77c01450 100644 --- a/packages/neon/lib/src/apps/news/widgets/articles_view.dart +++ b/packages/neon/lib/src/apps/news/widgets/articles_view.dart @@ -209,6 +209,7 @@ class _NewsArticlesViewState extends State { child: NewsFeedIcon( feed: feed, size: 16, + borderRadius: const BorderRadius.all(Radius.circular(2)), ), ), Flexible( diff --git a/packages/neon/lib/src/apps/news/widgets/feed_icon.dart b/packages/neon/lib/src/apps/news/widgets/feed_icon.dart index dfab396d..40613ed8 100644 --- a/packages/neon/lib/src/apps/news/widgets/feed_icon.dart +++ b/packages/neon/lib/src/apps/news/widgets/feed_icon.dart @@ -4,18 +4,23 @@ class NewsFeedIcon extends StatelessWidget { const NewsFeedIcon({ required this.feed, this.size = 48, + this.borderRadius, super.key, }); final NewsFeed feed; final double size; + final BorderRadius? borderRadius; @override Widget build(final BuildContext context) => SizedBox( width: size, height: size, - child: ColoredBox( - color: Colors.white, + child: DecoratedBox( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: borderRadius, + ), child: Center( child: feed.faviconLink != null && feed.faviconLink != '' ? CachedURLImage( diff --git a/packages/neon/lib/src/apps/news/widgets/feeds_view.dart b/packages/neon/lib/src/apps/news/widgets/feeds_view.dart index e94e8147..b94c90a6 100644 --- a/packages/neon/lib/src/apps/news/widgets/feeds_view.dart +++ b/packages/neon/lib/src/apps/news/widgets/feeds_view.dart @@ -117,6 +117,7 @@ class NewsFeedsView extends StatelessWidget { : Container(), leading: NewsFeedIcon( feed: feed, + borderRadius: const BorderRadius.all(Radius.circular(8)), ), trailing: Row( mainAxisSize: MainAxisSize.min,