design: Minor design tweaks

This commit is contained in:
Christian Pauly 2021-04-25 15:09:47 +02:00
parent 873649e383
commit 34b29e3e64
4 changed files with 12 additions and 11 deletions

View File

@ -42,7 +42,6 @@ abstract class AppConfig {
static const String emojiFontUrl = static const String emojiFontUrl =
'https://github.com/googlefonts/noto-emoji/'; 'https://github.com/googlefonts/noto-emoji/';
static const double borderRadius = 12.0; static const double borderRadius = 12.0;
static const double messageBubbleBorderRadius = 16.0;
static void loadFromJson(Map<String, dynamic> json) { static void loadFromJson(Map<String, dynamic> json) {
if (json['application_name'] is String) { if (json['application_name'] is String) {

View File

@ -270,6 +270,7 @@ class ChatUI extends StatelessWidget {
return ListView.custom( return ListView.custom(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 16, top: 16,
bottom: 4,
left: horizontalPadding, left: horizontalPadding,
right: horizontalPadding, right: horizontalPadding,
), ),

View File

@ -78,11 +78,10 @@ class Message extends StatelessWidget {
alignment: alignment, alignment: alignment,
child: Container( child: Container(
margin: const EdgeInsets.symmetric(horizontal: 8), margin: const EdgeInsets.symmetric(horizontal: 8),
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 10), padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
color: color, color: color,
borderRadius: borderRadius: BorderRadius.circular(AppConfig.borderRadius),
BorderRadius.circular(AppConfig.messageBubbleBorderRadius),
), ),
constraints: constraints:
BoxConstraints(maxWidth: FluffyThemes.columnWidth * 1.5), 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(100)
: Theme.of(context).primaryColor.withAlpha(0), : Theme.of(context).primaryColor.withAlpha(0),
child: Padding( 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, child: container,
), ),
), ),

View File

@ -20,17 +20,18 @@ class StateMessage extends StatelessWidget {
return InkWell( return InkWell(
onTap: counter != 0 ? () => unfold(event.eventId) : null, onTap: counter != 0 ? () => unfold(event.eventId) : null,
child: Padding( child: Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.symmetric(
left: 8.0, horizontal: 8.0,
right: 8.0, vertical: 4.0,
bottom: 8.0,
), ),
child: Center( child: Center(
child: Container( child: Container(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).secondaryHeaderColor, border: Border.all(
borderRadius: BorderRadius.circular(7), color: Theme.of(context).dividerColor,
),
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
), ),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,