From e5b7512e791640a1f75c9ce57870aea509d6881d Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 26 May 2026 21:50:40 -0400 Subject: [PATCH] nicer action buttons on user popover --- lib/widgets/user_popover.dart | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/widgets/user_popover.dart b/lib/widgets/user_popover.dart index 207d723..5da1368 100644 --- a/lib/widgets/user_popover.dart +++ b/lib/widgets/user_popover.dart @@ -79,6 +79,15 @@ class UserPopover extends ConsumerWidget { ), ); + final actionButton = ButtonStyle( + padding: WidgetStatePropertyAll( + EdgeInsets.symmetric(horizontal: 24, vertical: 18), + ), + shape: WidgetStatePropertyAll( + RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + ); + return Column( spacing: 16, crossAxisAlignment: CrossAxisAlignment.stretch, @@ -152,10 +161,16 @@ class UserPopover extends ConsumerWidget { if (userId != ref.watch(ClientStateController.provider)?.userId && roomId != null) Wrap( + alignment: WrapAlignment.center, spacing: 8, runSpacing: 8, children: [ - FilledButton.icon(onPressed: null, label: Text("Message")), + FilledButton.icon( + onPressed: null, + label: Text("Message"), + icon: Icon(Icons.message), + style: actionButton, + ), if (ref.watch( PowerLevelController.provider( @@ -171,7 +186,7 @@ class UserPopover extends ConsumerWidget { FilledButton.icon( onPressed: () => showMembershipDialog(MembershipAction.kick), label: Text("Kick"), - style: ButtonStyle( + style: actionButton.copyWith( backgroundColor: WidgetStatePropertyAll( theme.colorScheme.error, ), @@ -179,6 +194,7 @@ class UserPopover extends ConsumerWidget { theme.colorScheme.onError, ), ), + icon: Icon(Icons.sports_martial_arts), ), if (ref.watch( PowerLevelController.provider( @@ -195,10 +211,11 @@ class UserPopover extends ConsumerWidget { ? MembershipAction.unban : MembershipAction.ban, ), + icon: Icon(Icons.gavel), label: Text( member.status == MembershipStatus.ban ? "Unban" : "Ban", ), - style: ButtonStyle( + style: actionButton.copyWith( backgroundColor: WidgetStatePropertyAll( theme.colorScheme.errorContainer, ),