chore: Follow up bubble color

pull/1595/head
krille-chan 6 months ago
parent 59648bf2d7
commit 321cc07fb8
No known key found for this signature in database

@ -32,6 +32,23 @@ class ChatEventList extends StatelessWidget {
);
}
final theme = Theme.of(context);
const saturation = 0.85;
final colors = theme.brightness == Brightness.light
? [
HSLColor.fromColor(theme.colorScheme.tertiary)
.withSaturation(saturation)
.toColor(),
theme.colorScheme.primary,
]
: [
HSLColor.fromColor(theme.colorScheme.tertiaryContainer)
.withSaturation(saturation)
.toColor(),
theme.colorScheme.primaryContainer,
];
final horizontalPadding = FluffyThemes.isColumnMode(context) ? 8.0 : 0.0;
final events = timeline.events.filterByVisibleInGui();
@ -153,6 +170,7 @@ class ChatEventList extends StatelessWidget {
previousEvent: i > 0 ? events[i - 1] : null,
wallpaperMode: hasWallpaper,
scrollController: controller.scrollController,
colors: colors,
),
);
},

@ -39,6 +39,7 @@ class Message extends StatelessWidget {
final void Function()? resetAnimateIn;
final bool wallpaperMode;
final ScrollController scrollController;
final List<Color> colors;
const Message(
this.event, {
@ -58,6 +59,7 @@ class Message extends StatelessWidget {
this.resetAnimateIn,
this.wallpaperMode = false,
required this.scrollController,
required this.colors,
super.key,
});
@ -328,13 +330,7 @@ class Message extends StatelessWidget {
),
clipBehavior: Clip.antiAlias,
child: BubbleBackground(
colors: [
theme.brightness == Brightness.light
? theme.colorScheme.tertiary
: theme.colorScheme
.tertiaryContainer,
color,
],
colors: colors,
ignore: noBubble || !ownMessage,
scrollController: scrollController,
child: Container(

Loading…
Cancel
Save