Add more visible activity outline color in dark mode
This commit is contained in:
parent
31293b4794
commit
667922c909
1 changed files with 16 additions and 6 deletions
|
|
@ -296,13 +296,18 @@ class MessageTokenButtonContent extends StatelessWidget {
|
|||
BorderRadius.circular(AppConfig.borderRadius - 4);
|
||||
|
||||
Color _color(BuildContext context) {
|
||||
final bool isLight = Theme.of(context).brightness == Brightness.light;
|
||||
if (activity == null) {
|
||||
return Theme.of(context).colorScheme.primary;
|
||||
return isLight
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.primaryContainer;
|
||||
}
|
||||
if (isActivityCompleteOrNullForToken) {
|
||||
return AppConfig.gold;
|
||||
}
|
||||
return Theme.of(context).colorScheme.primary;
|
||||
return isLight
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.primaryContainer;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -384,10 +389,15 @@ class MessageTokenButtonContent extends StatelessWidget {
|
|||
borderRadius: _borderRadius,
|
||||
child: CustomPaint(
|
||||
painter: DottedBorderPainter(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primary
|
||||
.withAlpha((colorAlpha * 255).toInt()),
|
||||
color: Theme.of(context).brightness == Brightness.light
|
||||
? Theme.of(context)
|
||||
.colorScheme
|
||||
.primary
|
||||
.withAlpha((colorAlpha * 255).toInt())
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.primaryContainer
|
||||
.withAlpha((colorAlpha * 275).toInt()),
|
||||
borderRadius: _borderRadius,
|
||||
),
|
||||
child: Container(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue