From f24b3ee09b6504c6717122a3c1699ff43dcb1380 Mon Sep 17 00:00:00 2001 From: Krille Date: Wed, 15 Mar 2023 19:26:58 +0100 Subject: [PATCH] style: Minor adjustments for modal bottom sheets --- lib/pages/chat/chat_view.dart | 2 +- lib/pages/chat_list/chat_list_body.dart | 2 +- lib/pages/chat_list/chat_list_view.dart | 8 ++++---- lib/pages/settings/settings_view.dart | 2 +- .../user_bottom_sheet_view.dart | 16 ++++++++-------- lib/utils/adaptive_bottom_sheet.dart | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index e43d6b92..bf199906 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -326,7 +326,7 @@ class ChatView extends StatelessWidget { const EdgeInsets.all(16), ), icon: const Icon( - Icons.chat_outlined, + Icons.forum_outlined, ), onPressed: controller.recreateChat, diff --git a/lib/pages/chat_list/chat_list_body.dart b/lib/pages/chat_list/chat_list_body.dart index f5e018ec..14c02c2e 100644 --- a/lib/pages/chat_list/chat_list_body.dart +++ b/lib/pages/chat_list/chat_list_body.dart @@ -185,7 +185,7 @@ class ChatListViewBody extends StatelessWidget { if (controller.isSearchMode) SearchTitle( title: L10n.of(context)!.chats, - icon: const Icon(Icons.chat_outlined), + icon: const Icon(Icons.forum_outlined), ), if (rooms.isEmpty && !controller.isSearchMode) Padding( diff --git a/lib/pages/chat_list/chat_list_view.dart b/lib/pages/chat_list/chat_list_view.dart index 50262d13..81b44f9d 100644 --- a/lib/pages/chat_list/chat_list_view.dart +++ b/lib/pages/chat_list/chat_list_view.dart @@ -45,13 +45,13 @@ class ChatListView extends StatelessWidget { badgePosition: badgePosition, filter: controller.getRoomFilterByActiveFilter(ActiveFilter.messages), - child: const Icon(Icons.chat_outlined), + child: const Icon(Icons.forum_outlined), ), selectedIcon: UnreadRoomsBadge( badgePosition: badgePosition, filter: controller.getRoomFilterByActiveFilter(ActiveFilter.messages), - child: const Icon(Icons.chat), + child: const Icon(Icons.forum), ), label: L10n.of(context)!.messages, ), @@ -61,13 +61,13 @@ class ChatListView extends StatelessWidget { badgePosition: badgePosition, filter: controller.getRoomFilterByActiveFilter(ActiveFilter.allChats), - child: const Icon(Icons.chat_outlined), + child: const Icon(Icons.forum_outlined), ), selectedIcon: UnreadRoomsBadge( badgePosition: badgePosition, filter: controller.getRoomFilterByActiveFilter(ActiveFilter.allChats), - child: const Icon(Icons.chat), + child: const Icon(Icons.forum), ), label: L10n.of(context)!.chats, ), diff --git a/lib/pages/settings/settings_view.dart b/lib/pages/settings/settings_view.dart index 575a8783..2076b54d 100644 --- a/lib/pages/settings/settings_view.dart +++ b/lib/pages/settings/settings_view.dart @@ -169,7 +169,7 @@ class SettingsView extends StatelessWidget { trailing: const Icon(Icons.chevron_right_outlined), ), ListTile( - leading: const Icon(Icons.chat_bubble_outline_outlined), + leading: const Icon(Icons.forum_outlined), title: Text(L10n.of(context)!.chat), onTap: () => VRouter.of(context).to('/settings/chat'), trailing: const Icon(Icons.chevron_right_outlined), diff --git a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart index d3adf29a..1d93e1fb 100644 --- a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart +++ b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart @@ -33,8 +33,8 @@ class UserBottomSheetView extends StatelessWidget { child: OutlinedButton.icon( onPressed: () => controller .participantAction(UserBottomSheetAction.message), - icon: const Icon(Icons.chat_outlined), - label: Text(L10n.of(context)!.newChat), + icon: const Icon(Icons.forum_outlined), + label: Text(L10n.of(context)!.sendAMessage), ), ), ], @@ -72,7 +72,7 @@ class UserBottomSheetView extends StatelessWidget { ), if (controller.widget.onMention != null) ListTile( - trailing: const Icon(Icons.alternate_email_outlined), + leading: const Icon(Icons.alternate_email_outlined), title: Text(L10n.of(context)!.mention), onTap: () => controller.participantAction(UserBottomSheetAction.mention), @@ -80,14 +80,14 @@ class UserBottomSheetView extends StatelessWidget { if (user.canChangePowerLevel) ListTile( title: Text(L10n.of(context)!.setPermissionsLevel), - trailing: const Icon(Icons.edit_attributes_outlined), + leading: const Icon(Icons.edit_attributes_outlined), onTap: () => controller .participantAction(UserBottomSheetAction.permission), ), if (user.canKick) ListTile( title: Text(L10n.of(context)!.kickFromChat), - trailing: const Icon(Icons.exit_to_app_outlined), + leading: const Icon(Icons.exit_to_app_outlined), onTap: () => controller.participantAction(UserBottomSheetAction.kick), ), @@ -101,7 +101,7 @@ class UserBottomSheetView extends StatelessWidget { else if (user.canBan && user.membership == Membership.ban) ListTile( title: Text(L10n.of(context)!.unbanFromChat), - trailing: const Icon(Icons.warning_outlined), + leading: const Icon(Icons.warning_outlined), onTap: () => controller.participantAction(UserBottomSheetAction.unban), ), @@ -111,7 +111,7 @@ class UserBottomSheetView extends StatelessWidget { textColor: Theme.of(context).colorScheme.onErrorContainer, iconColor: Theme.of(context).colorScheme.onErrorContainer, title: Text(L10n.of(context)!.ignore), - trailing: const Icon(Icons.block), + leading: const Icon(Icons.block), onTap: () => controller.participantAction(UserBottomSheetAction.ignore), ), @@ -120,7 +120,7 @@ class UserBottomSheetView extends StatelessWidget { textColor: Theme.of(context).colorScheme.error, iconColor: Theme.of(context).colorScheme.error, title: Text(L10n.of(context)!.reportUser), - trailing: const Icon(Icons.shield_outlined), + leading: const Icon(Icons.shield_outlined), onTap: () => controller.participantAction(UserBottomSheetAction.report), ), diff --git a/lib/utils/adaptive_bottom_sheet.dart b/lib/utils/adaptive_bottom_sheet.dart index bfedb095..c9813d33 100644 --- a/lib/utils/adaptive_bottom_sheet.dart +++ b/lib/utils/adaptive_bottom_sheet.dart @@ -8,7 +8,7 @@ Future showAdaptiveBottomSheet({ required BuildContext context, required Widget Function(BuildContext) builder, bool isDismissible = true, - bool isScrollControlled = false, + bool isScrollControlled = true, }) => showModalBottomSheet( context: context, @@ -16,8 +16,8 @@ Future showAdaptiveBottomSheet({ useRootNavigator: !PlatformInfos.isMobile, isDismissible: isDismissible, isScrollControlled: isScrollControlled, - constraints: BoxConstraints( - maxHeight: MediaQuery.of(context).size.height - 128, + constraints: const BoxConstraints( + maxHeight: 480, maxWidth: FluffyThemes.columnWidth * 1.5, ), clipBehavior: Clip.hardEdge,