diff --git a/lib/config/themes.dart b/lib/config/themes.dart index 826f6440a..abedc1adb 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -56,7 +56,7 @@ abstract class FluffyThemes { : colorScheme.surfaceContainer, popupMenuTheme: PopupMenuThemeData( shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(AppConfig.borderRadius), + borderRadius: BorderRadius.circular(AppConfig.borderRadius / 2), ), ), segmentedButtonTheme: SegmentedButtonThemeData( diff --git a/lib/pages/chat_list/chat_list.dart b/lib/pages/chat_list/chat_list.dart index 7985a6a6e..bb962c5e0 100644 --- a/lib/pages/chat_list/chat_list.dart +++ b/lib/pages/chat_list/chat_list.dart @@ -550,17 +550,21 @@ class ChatListController extends State value: ChatContextAction.open, child: Row( mainAxisSize: MainAxisSize.min, + spacing: 12.0, children: [ Avatar( mxContent: room.avatar, - size: Avatar.defaultSize / 2, name: displayname, ), - const SizedBox(width: 12), - Text( - displayname, - style: - TextStyle(color: Theme.of(context).colorScheme.onSurface), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 128), + child: Text( + displayname, + style: + TextStyle(color: Theme.of(context).colorScheme.onSurface), + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), ), ], ), diff --git a/lib/widgets/member_actions_popup_menu_button.dart b/lib/widgets/member_actions_popup_menu_button.dart index e5e9cea0b..6179cc5fd 100644 --- a/lib/widgets/member_actions_popup_menu_button.dart +++ b/lib/widgets/member_actions_popup_menu_button.dart @@ -40,36 +40,42 @@ void showMemberActionsPopupMenu({ items: >[ PopupMenuItem( value: _MemberActions.info, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 8.0), - child: Center( - child: Column( + child: Row( + spacing: 12.0, + children: [ + Avatar( + name: displayname, + mxContent: user.avatarUrl, + presenceUserId: user.id, + presenceBackgroundColor: theme.colorScheme.surfaceContainer, + ), + Column( mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Avatar( - name: displayname, - mxContent: user.avatarUrl, - presenceUserId: user.id, - presenceBackgroundColor: theme.colorScheme.surfaceContainer, + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 128), + child: Text( + displayname, + textAlign: TextAlign.center, + style: theme.textTheme.labelLarge, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ), - const SizedBox(height: 8), - Text( - displayname, - textAlign: TextAlign.center, - style: theme.textTheme.labelLarge, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - Text( - user.id, - textAlign: TextAlign.center, - style: const TextStyle(fontSize: 10), - maxLines: 1, - overflow: TextOverflow.ellipsis, + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 128), + child: Text( + user.id, + textAlign: TextAlign.center, + style: const TextStyle(fontSize: 10), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ), ], ), - ), + ], ), ), const PopupMenuDivider(),