chore: Design follow up
This commit is contained in:
parent
65fd8a4184
commit
cdaaad9c54
4 changed files with 23 additions and 38 deletions
|
|
@ -306,27 +306,10 @@ class Message extends StatelessWidget {
|
||||||
curve: FluffyThemes.animationCurve,
|
curve: FluffyThemes.animationCurve,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: ownMessage
|
color: noBubble
|
||||||
? null
|
? Colors.transparent
|
||||||
: noBubble
|
: color,
|
||||||
? Colors.transparent
|
|
||||||
: color,
|
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
gradient: ownMessage && !noBubble
|
|
||||||
? LinearGradient(
|
|
||||||
colors: [
|
|
||||||
theme.colorScheme.primary,
|
|
||||||
theme.brightness ==
|
|
||||||
Brightness.light
|
|
||||||
? theme.colorScheme
|
|
||||||
.onPrimaryFixedVariant
|
|
||||||
: theme.colorScheme
|
|
||||||
.primaryFixed,
|
|
||||||
],
|
|
||||||
begin: Alignment.centerLeft,
|
|
||||||
end: Alignment.bottomRight,
|
|
||||||
)
|
|
||||||
: null,
|
|
||||||
),
|
),
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@ class ReplyContent extends StatelessWidget {
|
||||||
timeline != null ? replyEvent.getDisplayEvent(timeline) : replyEvent;
|
timeline != null ? replyEvent.getDisplayEvent(timeline) : replyEvent;
|
||||||
final fontSize = AppConfig.messageFontSize * AppConfig.fontSizeFactor;
|
final fontSize = AppConfig.messageFontSize * AppConfig.fontSizeFactor;
|
||||||
final color = ownMessage
|
final color = ownMessage
|
||||||
? theme.colorScheme.primaryContainer
|
? theme.colorScheme.tertiaryContainer
|
||||||
: theme.colorScheme.primary;
|
: theme.colorScheme.tertiary;
|
||||||
|
|
||||||
return Material(
|
return Material(
|
||||||
color: backgroundColor ??
|
color: backgroundColor ??
|
||||||
|
|
@ -56,6 +56,7 @@ class ReplyContent extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
FutureBuilder<User?>(
|
FutureBuilder<User?>(
|
||||||
|
initialData: displayEvent.senderFromMemoryOrFallback,
|
||||||
future: displayEvent.fetchSenderUser(),
|
future: displayEvent.fetchSenderUser(),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
return Text(
|
return Text(
|
||||||
|
|
@ -80,7 +81,7 @@ class ReplyContent extends StatelessWidget {
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ownMessage
|
color: ownMessage
|
||||||
? theme.colorScheme.onPrimary
|
? theme.colorScheme.onTertiary
|
||||||
: theme.colorScheme.onSurface,
|
: theme.colorScheme.onSurface,
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class ParticipantListItem extends StatelessWidget {
|
||||||
Membership.leave => L10n.of(context).leftTheChat,
|
Membership.leave => L10n.of(context).leftTheChat,
|
||||||
};
|
};
|
||||||
|
|
||||||
final permissionBatch = user.powerLevel == 100
|
final permissionBatch = user.powerLevel >= 100
|
||||||
? L10n.of(context).admin
|
? L10n.of(context).admin
|
||||||
: user.powerLevel >= 50
|
: user.powerLevel >= 50
|
||||||
? L10n.of(context).moderator
|
? L10n.of(context).moderator
|
||||||
|
|
@ -56,14 +56,20 @@ class ParticipantListItem extends StatelessWidget {
|
||||||
vertical: 6,
|
vertical: 6,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: theme.colorScheme.primaryContainer,
|
color: user.powerLevel >= 100
|
||||||
|
? theme.colorScheme.tertiary
|
||||||
|
: theme.colorScheme.tertiaryContainer,
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
AppConfig.borderRadius,
|
AppConfig.borderRadius,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
permissionBatch,
|
permissionBatch,
|
||||||
style: TextStyle(color: theme.colorScheme.onPrimaryContainer),
|
style: theme.textTheme.labelSmall?.copyWith(
|
||||||
|
color: user.powerLevel >= 100
|
||||||
|
? theme.colorScheme.onTertiary
|
||||||
|
: theme.colorScheme.onTertiaryContainer,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
membershipBatch == null
|
membershipBatch == null
|
||||||
|
|
@ -75,7 +81,12 @@ class ParticipantListItem extends StatelessWidget {
|
||||||
color: theme.secondaryHeaderColor,
|
color: theme.secondaryHeaderColor,
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
child: Center(child: Text(membershipBatch)),
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
membershipBatch,
|
||||||
|
style: theme.textTheme.labelSmall,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -213,17 +213,7 @@ class SettingsStyleView extends StatelessWidget {
|
||||||
),
|
),
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
color: theme.colorScheme.primary,
|
||||||
colors: [
|
|
||||||
theme.colorScheme.primary,
|
|
||||||
theme.brightness == Brightness.light
|
|
||||||
? theme.colorScheme
|
|
||||||
.onPrimaryFixedVariant
|
|
||||||
: theme.colorScheme.primaryFixed,
|
|
||||||
],
|
|
||||||
begin: Alignment.centerLeft,
|
|
||||||
end: Alignment.bottomRight,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
AppConfig.borderRadius,
|
AppConfig.borderRadius,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue