diff --git a/lib/global.dart b/lib/global.dart index ae096a3..0606e27 100644 --- a/lib/global.dart +++ b/lib/global.dart @@ -24,7 +24,7 @@ const List bad = [ ]; double getWidth(context) { - return (MediaQuery.of(context).size.width * settings!.postWidth) - 56; + return (MediaQuery.of(context).size.width * settings!.postWidth) - 24; } BoxConstraints getConstraints(context) { diff --git a/lib/pages/notifications/notifications.dart b/lib/pages/notifications/notifications.dart index ba12528..81af0c6 100644 --- a/lib/pages/notifications/notifications.dart +++ b/lib/pages/notifications/notifications.dart @@ -132,8 +132,8 @@ class _NotificationsState extends State { controller: _controller, addSemanticIndexes: true, itemBuilder: ((context, index) => notifs[index]), - separatorBuilder: (context, index) => const SizedBox( - height: 8, + separatorBuilder: (context, index) => const Divider( + color: Colors.transparent, ), itemCount: notifs.length), ), diff --git a/lib/pages/notifications/single_notif.dart b/lib/pages/notifications/single_notif.dart index c307fec..292ce37 100644 --- a/lib/pages/notifications/single_notif.dart +++ b/lib/pages/notifications/single_notif.dart @@ -13,87 +13,78 @@ class SingleNotif extends StatelessWidget { @override Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.all(8), - child: Align( - child: Container( - width: - (MediaQuery.of(context).size.width * global.settings!.postWidth) - - 56, - constraints: BoxConstraints( - maxWidth: global.settings!.maxPostWidth, - minWidth: 375, + return Align( + child: Container( + width: global.getWidth(context), + constraints: global.getConstraints(context), + padding: const EdgeInsets.all(24), + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.surface, + border: Border.all( + color: Theme.of(context).colorScheme.secondary, + width: 2, ), - padding: const EdgeInsets.all(24), - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surface, - border: Border.all( - color: Theme.of(context).colorScheme.secondary, - width: 2, - ), - borderRadius: BorderRadius.circular(8), - ), - child: Material( - child: Column( - children: [ - InkWell( - onTap: () => showDialog( - context: context, - builder: (context) => ProfileView(model: model.account), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - ProfilePic(url: model.account.avatar), - const SizedBox( - width: 8, - ), - Expanded( - flex: 20, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SelectableText( - model.account.displayName, - style: Theme.of(context).textTheme.displaySmall, - ), - SelectableText.rich( - TextSpan( - text: "${model.account.acct} ", - style: Theme.of(context).textTheme.bodySmall, - children: [ - TextSpan( - text: model.type.actionName, - style: Theme.of(context) - .textTheme - .bodyMedium) - ], - ), - ), - ], - ), - ), - Icon( - model.type.icon, - size: 64, - ), - ], - ), + borderRadius: BorderRadius.circular(8), + ), + child: Material( + child: Column( + children: [ + InkWell( + onTap: () => showDialog( + context: context, + builder: (context) => ProfileView(model: model.account), ), - const SizedBox( - height: 8, - ), - (model.post != null) - ? (Post( - reblogVisible: false, - model: model.post!, - )) - : const SizedBox( - width: 0, - height: 0, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + ProfilePic(url: model.account.avatar), + const SizedBox( + width: 8, + ), + Expanded( + flex: 20, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SelectableText( + model.account.displayName, + style: Theme.of(context).textTheme.displaySmall, + ), + SelectableText.rich( + TextSpan( + text: "${model.account.acct} ", + style: Theme.of(context).textTheme.bodySmall, + children: [ + TextSpan( + text: model.type.actionName, + style: + Theme.of(context).textTheme.bodyMedium) + ], + ), + ), + ], ), - ], - ), + ), + Icon( + model.type.icon, + size: 64, + ), + ], + ), + ), + const SizedBox( + height: 8, + ), + (model.post != null) + ? (Post( + reblogVisible: false, + model: model.post!, + )) + : const SizedBox( + width: 0, + height: 0, + ), + ], ), ), ), diff --git a/lib/pages/timeline/timeline.dart b/lib/pages/timeline/timeline.dart index e54a075..1e97eb3 100644 --- a/lib/pages/timeline/timeline.dart +++ b/lib/pages/timeline/timeline.dart @@ -215,7 +215,6 @@ class TimelineState extends State { ); }, itemCount: children.length, - padding: const EdgeInsets.fromLTRB(24, 0, 24, 64), addAutomaticKeepAlives: false, ), ), diff --git a/lib/partials/post.dart b/lib/partials/post.dart index ed2dbe8..c25554b 100644 --- a/lib/partials/post.dart +++ b/lib/partials/post.dart @@ -309,7 +309,9 @@ class _PostActionBarState extends State { @override Widget build(BuildContext context) { return Wrap( + spacing: 8, alignment: WrapAlignment.spaceAround, + crossAxisAlignment: WrapCrossAlignment.center, children: [ IconButton( onPressed: () { diff --git a/lib/partials/thread.dart b/lib/partials/thread.dart index 9088e9a..3665a59 100644 --- a/lib/partials/thread.dart +++ b/lib/partials/thread.dart @@ -78,21 +78,18 @@ class _ThreadState extends State { } if (!widget.constrained) { - return Padding( - padding: const EdgeInsets.all(4), - child: Container( - padding: const EdgeInsets.all(24), - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surface, - border: Border.all( - color: Theme.of(context).colorScheme.secondary, - width: 2, - ), - borderRadius: BorderRadius.circular(8), - ), - child: Column( - children: c, + return Container( + padding: const EdgeInsets.all(8), + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.surface, + border: Border.all( + color: Theme.of(context).colorScheme.secondary, + width: 2, ), + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: c, ), ); } @@ -109,9 +106,7 @@ class _ThreadState extends State { color: Theme.of(context).colorScheme.secondary, ), ), - width: - (MediaQuery.of(context).size.width * global.settings!.postWidth) - - 56, + width: global.getWidth(context), constraints: global.getConstraints(context), child: Material( borderRadius: const BorderRadius.all(Radius.circular(8)),