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 horizontalPadding = FluffyThemes.isColumnMode(context) ? 8.0 : 0.0;
final events = timeline.events.filterByVisibleInGui(); final events = timeline.events.filterByVisibleInGui();
@ -153,6 +170,7 @@ class ChatEventList extends StatelessWidget {
previousEvent: i > 0 ? events[i - 1] : null, previousEvent: i > 0 ? events[i - 1] : null,
wallpaperMode: hasWallpaper, wallpaperMode: hasWallpaper,
scrollController: controller.scrollController, scrollController: controller.scrollController,
colors: colors,
), ),
); );
}, },

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

Loading…
Cancel
Save