chore: Follow up bubble color
This commit is contained in:
parent
59648bf2d7
commit
321cc07fb8
2 changed files with 21 additions and 7 deletions
|
|
@ -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…
Add table
Reference in a new issue