From 34b29e3e64e9bad71c3eb6c5cc37d3282e8c8f8d Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 25 Apr 2021 15:09:47 +0200 Subject: [PATCH] design: Minor design tweaks --- lib/config/app_config.dart | 1 - lib/views/ui/chat_ui.dart | 1 + lib/views/widgets/list_items/message.dart | 8 ++++---- lib/views/widgets/list_items/state_message.dart | 13 +++++++------ 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/config/app_config.dart b/lib/config/app_config.dart index 61f80912..86dfe078 100644 --- a/lib/config/app_config.dart +++ b/lib/config/app_config.dart @@ -42,7 +42,6 @@ abstract class AppConfig { static const String emojiFontUrl = 'https://github.com/googlefonts/noto-emoji/'; static const double borderRadius = 12.0; - static const double messageBubbleBorderRadius = 16.0; static void loadFromJson(Map json) { if (json['application_name'] is String) { diff --git a/lib/views/ui/chat_ui.dart b/lib/views/ui/chat_ui.dart index d563245a..349d70cd 100644 --- a/lib/views/ui/chat_ui.dart +++ b/lib/views/ui/chat_ui.dart @@ -270,6 +270,7 @@ class ChatUI extends StatelessWidget { return ListView.custom( padding: EdgeInsets.only( top: 16, + bottom: 4, left: horizontalPadding, right: horizontalPadding, ), diff --git a/lib/views/widgets/list_items/message.dart b/lib/views/widgets/list_items/message.dart index 09ad116d..ae868a33 100644 --- a/lib/views/widgets/list_items/message.dart +++ b/lib/views/widgets/list_items/message.dart @@ -78,11 +78,10 @@ class Message extends StatelessWidget { alignment: alignment, child: Container( margin: const EdgeInsets.symmetric(horizontal: 8), - padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 10), + padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 10), decoration: BoxDecoration( color: color, - borderRadius: - BorderRadius.circular(AppConfig.messageBubbleBorderRadius), + borderRadius: BorderRadius.circular(AppConfig.borderRadius), ), constraints: BoxConstraints(maxWidth: FluffyThemes.columnWidth * 1.5), @@ -208,7 +207,8 @@ class Message extends StatelessWidget { ? Theme.of(context).primaryColor.withAlpha(100) : Theme.of(context).primaryColor.withAlpha(0), child: Padding( - padding: EdgeInsets.only(left: 8.0, right: 8.0, bottom: 8.0), + padding: + EdgeInsets.only(left: 8.0, right: 8.0, bottom: 4.0, top: 4.0), child: container, ), ), diff --git a/lib/views/widgets/list_items/state_message.dart b/lib/views/widgets/list_items/state_message.dart index 91bc90dd..5792830f 100644 --- a/lib/views/widgets/list_items/state_message.dart +++ b/lib/views/widgets/list_items/state_message.dart @@ -20,17 +20,18 @@ class StateMessage extends StatelessWidget { return InkWell( onTap: counter != 0 ? () => unfold(event.eventId) : null, child: Padding( - padding: const EdgeInsets.only( - left: 8.0, - right: 8.0, - bottom: 8.0, + padding: const EdgeInsets.symmetric( + horizontal: 8.0, + vertical: 4.0, ), child: Center( child: Container( padding: const EdgeInsets.all(8), decoration: BoxDecoration( - color: Theme.of(context).secondaryHeaderColor, - borderRadius: BorderRadius.circular(7), + border: Border.all( + color: Theme.of(context).dividerColor, + ), + borderRadius: BorderRadius.circular(AppConfig.borderRadius), ), child: Column( mainAxisSize: MainAxisSize.min,