chore: Design follow up

pull/465/head
krille-chan 2 years ago
parent c4bc626b09
commit ee6a16604e
No known key found for this signature in database

@ -70,9 +70,7 @@ class Message extends StatelessWidget {
final client = Matrix.of(context).client; final client = Matrix.of(context).client;
final ownMessage = event.senderId == client.userID; final ownMessage = event.senderId == client.userID;
final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft; final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
var color = Theme.of(context).brightness == Brightness.light var color = Theme.of(context).colorScheme.surfaceVariant;
? Colors.white
: Theme.of(context).colorScheme.surfaceVariant;
final displayTime = event.type == EventTypes.RoomCreate || final displayTime = event.type == EventTypes.RoomCreate ||
nextEvent == null || nextEvent == null ||
!event.originServerTs.sameEnvironment(nextEvent!.originServerTs); !event.originServerTs.sameEnvironment(nextEvent!.originServerTs);
@ -187,15 +185,7 @@ class Message extends StatelessWidget {
padding: const EdgeInsets.only(left: 8), padding: const EdgeInsets.only(left: 8),
child: Material( child: Material(
color: noBubble ? Colors.transparent : color, color: noBubble ? Colors.transparent : color,
shape: RoundedRectangleBorder(
borderRadius: borderRadius, borderRadius: borderRadius,
side: noBubble
? BorderSide.none
: BorderSide(
color: Theme.of(context).dividerTheme.color ??
Theme.of(context).dividerColor,
),
),
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
child: InkWell( child: InkWell(
onHover: (b) => useMouse = true, onHover: (b) => useMouse = true,
@ -396,6 +386,10 @@ class Message extends StatelessWidget {
container = row; container = row;
} }
if (event.messageType == MessageTypes.BadEncrypted) {
container = Opacity(opacity: 0.33, child: container);
}
return Swipeable( return Swipeable(
key: ValueKey(event.eventId), key: ValueKey(event.eventId),
background: const Padding( background: const Padding(

@ -36,7 +36,7 @@ class ReplyContent extends StatelessWidget {
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
color: ownMessage color: ownMessage
? Theme.of(context).colorScheme.onPrimary ? Theme.of(context).colorScheme.onPrimaryContainer
: Theme.of(context).colorScheme.onBackground, : Theme.of(context).colorScheme.onBackground,
fontSize: fontSize, fontSize: fontSize,
), ),
@ -49,7 +49,7 @@ class ReplyContent extends StatelessWidget {
width: 3, width: 3,
height: fontSize * 2 + 6, height: fontSize * 2 + 6,
color: ownMessage color: ownMessage
? Theme.of(context).colorScheme.onPrimary ? Theme.of(context).colorScheme.onPrimaryContainer
: Theme.of(context).colorScheme.onBackground, : Theme.of(context).colorScheme.onBackground,
), ),
const SizedBox(width: 6), const SizedBox(width: 6),
@ -68,7 +68,7 @@ class ReplyContent extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: ownMessage color: ownMessage
? Theme.of(context).colorScheme.onPrimary ? Theme.of(context).colorScheme.onPrimaryContainer
: Theme.of(context).colorScheme.onBackground, : Theme.of(context).colorScheme.onBackground,
fontSize: fontSize, fontSize: fontSize,
), ),

@ -147,12 +147,7 @@ class SettingsStyleView extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 12), padding: const EdgeInsets.symmetric(horizontal: 12),
child: Material( child: Material(
color: Theme.of(context).colorScheme.primaryContainer, color: Theme.of(context).colorScheme.primaryContainer,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppConfig.borderRadius), borderRadius: BorderRadius.circular(AppConfig.borderRadius),
side: BorderSide(
color: Theme.of(context).dividerColor,
),
),
child: Padding( child: Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 16 * AppConfig.bubbleSizeFactor, horizontal: 16 * AppConfig.bubbleSizeFactor,

Loading…
Cancel
Save