mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 09:35:12 +00:00
chore: Design follow up
This commit is contained in:
parent
c4bc626b09
commit
ee6a16604e
3 changed files with 10 additions and 21 deletions
|
@ -70,9 +70,7 @@ class Message extends StatelessWidget {
|
|||
final client = Matrix.of(context).client;
|
||||
final ownMessage = event.senderId == client.userID;
|
||||
final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
|
||||
var color = Theme.of(context).brightness == Brightness.light
|
||||
? Colors.white
|
||||
: Theme.of(context).colorScheme.surfaceVariant;
|
||||
var color = Theme.of(context).colorScheme.surfaceVariant;
|
||||
final displayTime = event.type == EventTypes.RoomCreate ||
|
||||
nextEvent == null ||
|
||||
!event.originServerTs.sameEnvironment(nextEvent!.originServerTs);
|
||||
|
@ -187,15 +185,7 @@ class Message extends StatelessWidget {
|
|||
padding: const EdgeInsets.only(left: 8),
|
||||
child: Material(
|
||||
color: noBubble ? Colors.transparent : color,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: borderRadius,
|
||||
side: noBubble
|
||||
? BorderSide.none
|
||||
: BorderSide(
|
||||
color: Theme.of(context).dividerTheme.color ??
|
||||
Theme.of(context).dividerColor,
|
||||
),
|
||||
),
|
||||
borderRadius: borderRadius,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: InkWell(
|
||||
onHover: (b) => useMouse = true,
|
||||
|
@ -396,6 +386,10 @@ class Message extends StatelessWidget {
|
|||
container = row;
|
||||
}
|
||||
|
||||
if (event.messageType == MessageTypes.BadEncrypted) {
|
||||
container = Opacity(opacity: 0.33, child: container);
|
||||
}
|
||||
|
||||
return Swipeable(
|
||||
key: ValueKey(event.eventId),
|
||||
background: const Padding(
|
||||
|
|
|
@ -36,7 +36,7 @@ class ReplyContent extends StatelessWidget {
|
|||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
color: ownMessage
|
||||
? Theme.of(context).colorScheme.onPrimary
|
||||
? Theme.of(context).colorScheme.onPrimaryContainer
|
||||
: Theme.of(context).colorScheme.onBackground,
|
||||
fontSize: fontSize,
|
||||
),
|
||||
|
@ -49,7 +49,7 @@ class ReplyContent extends StatelessWidget {
|
|||
width: 3,
|
||||
height: fontSize * 2 + 6,
|
||||
color: ownMessage
|
||||
? Theme.of(context).colorScheme.onPrimary
|
||||
? Theme.of(context).colorScheme.onPrimaryContainer
|
||||
: Theme.of(context).colorScheme.onBackground,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
|
@ -68,7 +68,7 @@ class ReplyContent extends StatelessWidget {
|
|||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: ownMessage
|
||||
? Theme.of(context).colorScheme.onPrimary
|
||||
? Theme.of(context).colorScheme.onPrimaryContainer
|
||||
: Theme.of(context).colorScheme.onBackground,
|
||||
fontSize: fontSize,
|
||||
),
|
||||
|
|
|
@ -147,12 +147,7 @@ class SettingsStyleView extends StatelessWidget {
|
|||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Material(
|
||||
color: Theme.of(context).colorScheme.primaryContainer,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||
side: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
),
|
||||
),
|
||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16 * AppConfig.bubbleSizeFactor,
|
||||
|
|
Loading…
Reference in a new issue