From c7eaa41ed40066e923cb51ea999c5e6b403f28f5 Mon Sep 17 00:00:00 2001 From: Ben Hills Date: Thu, 18 Apr 2024 14:34:56 +0100 Subject: [PATCH] #124 Set top margin on p tags to 0. Helps ensure HTML descriptions start at top of parent. --- lib/ui/podcast/podcast_details.dart | 2 +- lib/ui/widgets/podcast_html.dart | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ui/podcast/podcast_details.dart b/lib/ui/podcast/podcast_details.dart index 0559f80a..bc184a89 100644 --- a/lib/ui/podcast/podcast_details.dart +++ b/lib/ui/podcast/podcast_details.dart @@ -399,7 +399,7 @@ class _PodcastTitleState extends State { child: Text(widget.podcast.title, style: textTheme.titleLarge), ), Padding( - padding: const EdgeInsets.fromLTRB(8, 0, 8, 8), + padding: const EdgeInsets.fromLTRB(8, 0, 8, 4), child: Text(widget.podcast.copyright ?? '', style: textTheme.bodySmall), ), ], diff --git a/lib/ui/widgets/podcast_html.dart b/lib/ui/widgets/podcast_html.dart index dee761fb..0fb13787 100644 --- a/lib/ui/widgets/podcast_html.dart +++ b/lib/ui/widgets/podcast_html.dart @@ -35,6 +35,9 @@ class PodcastHtml extends StatelessWidget { 'html': Style( fontWeight: textTheme.bodyLarge!.fontWeight, fontSize: fontSize ?? FontSize.large, + ), + 'p': Style( + margin: Margins.only(top: 0, bottom: 12), ) }, onLinkTap: (url, _, __) => canLaunchUrl(Uri.parse(url!)).then((value) => launchUrl(