From 9c24547b7f61a96df746e3f0f52790dabe65a55b Mon Sep 17 00:00:00 2001 From: Krille Date: Fri, 22 Dec 2023 13:39:11 +0100 Subject: [PATCH] design: Adjust new chat page design --- .../new_private_chat_view.dart | 53 +++++++++---------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/lib/pages/new_private_chat/new_private_chat_view.dart b/lib/pages/new_private_chat/new_private_chat_view.dart index c733a72de..56247ab00 100644 --- a/lib/pages/new_private_chat/new_private_chat_view.dart +++ b/lib/pages/new_private_chat/new_private_chat_view.dart @@ -30,10 +30,10 @@ class NewPrivateChatView extends StatelessWidget { title: Text(L10n.of(context)!.newChat), backgroundColor: Theme.of(context).scaffoldBackgroundColor, actions: [ - IconButton( + TextButton( onPressed: UrlLauncher(context, AppConfig.startChatTutorial).launchUrl, - icon: const Icon(Icons.info_outlined), + child: Text(L10n.of(context)!.help), ), ], ), @@ -42,7 +42,10 @@ class NewPrivateChatView extends StatelessWidget { child: Column( children: [ Padding( - padding: const EdgeInsets.symmetric(horizontal: 12.0), + padding: const EdgeInsets.symmetric( + horizontal: 16.0, + vertical: 8.0, + ), child: TextField( controller: controller.controller, onChanged: controller.searchUsers, @@ -88,8 +91,9 @@ class NewPrivateChatView extends StatelessWidget { : CrossFadeState.showSecond, firstChild: ListView( children: [ - ListTile( - title: SelectableText.rich( + Padding( + padding: const EdgeInsets.symmetric(horizontal: 18.0), + child: SelectableText.rich( TextSpan( children: [ TextSpan( @@ -104,33 +108,12 @@ class NewPrivateChatView extends StatelessWidget { ], ), style: TextStyle( - color: - Theme.of(context).colorScheme.onPrimaryContainer, - fontSize: 14, + color: Theme.of(context).colorScheme.onSurface, + fontSize: 13, ), ), - trailing: IconButton( - icon: Icon( - Icons.copy_outlined, - size: 16, - color: - Theme.of(context).colorScheme.onPrimaryContainer, - ), - onPressed: controller.copyUserId, - ), ), - if (PlatformInfos.isMobile) - ListTile( - leading: CircleAvatar( - backgroundColor: - Theme.of(context).colorScheme.primaryContainer, - foregroundColor: - Theme.of(context).colorScheme.onPrimaryContainer, - child: const Icon(Icons.qr_code_scanner_outlined), - ), - title: Text(L10n.of(context)!.scanQrCode), - onTap: controller.openScannerAction, - ), + const SizedBox(height: 8), ListTile( leading: CircleAvatar( backgroundColor: @@ -153,6 +136,18 @@ class NewPrivateChatView extends StatelessWidget { title: Text(L10n.of(context)!.createGroup), onTap: () => context.go('/rooms/newgroup'), ), + if (PlatformInfos.isMobile) + ListTile( + leading: CircleAvatar( + backgroundColor: + Theme.of(context).colorScheme.primaryContainer, + foregroundColor: + Theme.of(context).colorScheme.onPrimaryContainer, + child: const Icon(Icons.qr_code_scanner_outlined), + ), + title: Text(L10n.of(context)!.scanQrCode), + onTap: controller.openScannerAction, + ), Center( child: Padding( padding: const EdgeInsets.all(64.0),