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 =
'https://github.com/googlefonts/noto-emoji/';
static const double borderRadius = 12.0;
static const double messageBubbleBorderRadius = 16.0;
static void loadFromJson(Map<String, dynamic> json) {
if (json['application_name'] is String) {

View File

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

View File

@ -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,
),
),

View File

@ -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,