mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-08-03 03:36:23 -04:00
better time and status position
This commit is contained in:
parent
b8eca1161e
commit
8aaca62ea7
5 changed files with 119 additions and 116 deletions
|
@ -354,7 +354,10 @@ extension ScaleChatThemeExt on ScaleTheme {
|
|||
: scheme.primaryScale.calloutText,
|
||||
),
|
||||
onlyEmojiFontSize: 64,
|
||||
timeStyle: textTheme.bodySmall!.copyWith(fontSize: 9),
|
||||
timeStyle: textTheme.bodySmall!.copyWith(fontSize: 9).copyWith(
|
||||
color: config.preferBorders || config.useVisualIndicators
|
||||
? scheme.primaryScale.calloutBackground
|
||||
: scheme.primaryScale.borderText),
|
||||
receivedMessageBodyTextStyle: textTheme.bodyLarge!.copyWith(
|
||||
color: config.preferBorders
|
||||
? scheme.secondaryScale.calloutBackground
|
||||
|
|
|
@ -464,6 +464,38 @@ Widget styledTitleContainer({
|
|||
]));
|
||||
}
|
||||
|
||||
Widget styledContainer({
|
||||
required BuildContext context,
|
||||
required Widget child,
|
||||
Color? borderColor,
|
||||
Color? backgroundColor,
|
||||
}) {
|
||||
final theme = Theme.of(context);
|
||||
final scale = theme.extension<ScaleScheme>()!;
|
||||
final scaleConfig = theme.extension<ScaleConfig>()!;
|
||||
|
||||
return DecoratedBox(
|
||||
decoration: ShapeDecoration(
|
||||
color: borderColor ?? scale.primaryScale.border,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(8 * scaleConfig.borderRadiusScale),
|
||||
)),
|
||||
child: Column(children: [
|
||||
DecoratedBox(
|
||||
decoration: ShapeDecoration(
|
||||
color:
|
||||
backgroundColor ?? scale.primaryScale.subtleBackground,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(
|
||||
8 * scaleConfig.borderRadiusScale),
|
||||
)),
|
||||
child: child)
|
||||
.paddingAll(4)
|
||||
.expanded()
|
||||
]));
|
||||
}
|
||||
|
||||
Widget styledCard({
|
||||
required BuildContext context,
|
||||
required Widget child,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue