From c670dc2700eaa35aadf88eebd3506a85d278461e Mon Sep 17 00:00:00 2001 From: Krille Date: Sun, 5 Feb 2023 10:18:32 +0100 Subject: [PATCH] chore: Follow up style adjustments --- lib/pages/chat_list/chat_list_item.dart | 6 ++++- lib/pages/settings/settings_view.dart | 23 ++++++++----------- .../settings_chat/settings_chat_view.dart | 22 +++++++++--------- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index 574f4b09..94919381 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -128,7 +128,10 @@ class ChatListItem extends StatelessWidget { MatrixLocals(L10n.of(context)!), ); return Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), + padding: const EdgeInsets.symmetric( + horizontal: 8, + vertical: 1, + ), child: Material( borderRadius: BorderRadius.circular(AppConfig.borderRadius), clipBehavior: Clip.hardEdge, @@ -138,6 +141,7 @@ class ChatListItem extends StatelessWidget { ? Theme.of(context).colorScheme.secondaryContainer : Colors.transparent, child: ListTile( + visualDensity: const VisualDensity(vertical: -0.5), contentPadding: const EdgeInsets.symmetric(horizontal: 8), onLongPress: onLongPress, leading: selected diff --git a/lib/pages/settings/settings_view.dart b/lib/pages/settings/settings_view.dart index 19d57f0c..be0326f3 100644 --- a/lib/pages/settings/settings_view.dart +++ b/lib/pages/settings/settings_view.dart @@ -87,15 +87,15 @@ class SettingsView extends StatelessWidget { ), ), Expanded( - child: ListTile( - contentPadding: EdgeInsets.zero, - title: Align( - alignment: Alignment.centerLeft, - child: TextButton.icon( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextButton.icon( onPressed: controller.setDisplaynameAction, icon: const Icon( Icons.edit_outlined, - size: 18, + size: 16, ), style: TextButton.styleFrom( foregroundColor: @@ -105,13 +105,10 @@ class SettingsView extends StatelessWidget { displayname, maxLines: 1, overflow: TextOverflow.ellipsis, - style: const TextStyle(fontSize: 18), + // style: const TextStyle(fontSize: 18), ), ), - ), - subtitle: Align( - alignment: Alignment.centerLeft, - child: TextButton.icon( + TextButton.icon( onPressed: () => FluffyShare.share(mxid, context), icon: const Icon( Icons.copy_outlined, @@ -125,10 +122,10 @@ class SettingsView extends StatelessWidget { mxid, maxLines: 1, overflow: TextOverflow.ellipsis, - style: const TextStyle(fontSize: 12), + // style: const TextStyle(fontSize: 12), ), ), - ), + ], ), ), ], diff --git a/lib/pages/settings_chat/settings_chat_view.dart b/lib/pages/settings_chat/settings_chat_view.dart index 2f9a69e4..6437c689 100644 --- a/lib/pages/settings_chat/settings_chat_view.dart +++ b/lib/pages/settings_chat/settings_chat_view.dart @@ -27,6 +27,16 @@ class SettingsChatView extends StatelessWidget { withScrolling: true, child: Column( children: [ + ListTile( + title: Text(L10n.of(context)!.emoteSettings), + onTap: () => VRouter.of(context).to('emotes'), + trailing: const Icon(Icons.chevron_right_outlined), + leading: const Padding( + padding: EdgeInsets.all(16.0), + child: Icon(Icons.insert_emoticon_outlined), + ), + ), + const Divider(height: 1), SettingsSwitchListTile.adaptive( title: L10n.of(context)!.renderRichContent, onChanged: (b) => AppConfig.renderHtml = b, @@ -58,6 +68,7 @@ class SettingsChatView extends StatelessWidget { storeKey: SettingKeys.autoplayImages, defaultValue: AppConfig.autoplayImages, ), + const Divider(height: 1), SettingsSwitchListTile.adaptive( title: L10n.of(context)!.sendOnEnter, onChanged: (b) => AppConfig.sendOnEnter = b, @@ -75,7 +86,6 @@ class SettingsChatView extends StatelessWidget { storeKey: SettingKeys.experimentalVoip, defaultValue: AppConfig.experimentalVoip, ), - const Divider(height: 1), if (Matrix.of(context).webrtcIsSupported && !kIsWeb) ListTile( title: Text(L10n.of(context)!.callingPermissions), @@ -86,16 +96,6 @@ class SettingsChatView extends StatelessWidget { child: Icon(Icons.call), ), ), - const Divider(height: 1), - ListTile( - title: Text(L10n.of(context)!.emoteSettings), - onTap: () => VRouter.of(context).to('emotes'), - trailing: const Padding( - padding: EdgeInsets.all(16.0), - child: Icon(Icons.insert_emoticon_outlined), - ), - ), - const Divider(height: 1), SettingsSwitchListTile.adaptive( title: L10n.of(context)!.separateChatTypes, onChanged: (b) => AppConfig.separateChatTypes = b,