Merge pull request #317 from pangeachat/handles-stand-out

Make selection handles stand out
pull/1183/head
ggurdin 1 year ago committed by GitHub
commit bdf43eb2d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -47,6 +47,10 @@ class OverlayMessage extends StatelessWidget {
}
var color = Theme.of(context).colorScheme.surfaceVariant;
// #Pangea
final isLight = Theme.of(context).brightness == Brightness.light;
var lightness = isLight ? .05 : .85;
// Pangea#
final textColor = ownMessage
? Theme.of(context).colorScheme.onPrimary
: Theme.of(context).colorScheme.onBackground;
@ -98,7 +102,21 @@ class OverlayMessage extends StatelessWidget {
if (ownMessage) {
color = Theme.of(context).colorScheme.primary;
lightness = isLight ? .15 : .85;
}
// Make overlay a little darker/lighter than the message
color = Color.fromARGB(
color.alpha,
isLight
? (color.red + lightness * (255 - color.red)).round()
: (color.red * lightness).round(),
isLight
? (color.green + lightness * (255 - color.green)).round()
: (color.green * lightness).round(),
isLight
? (color.blue + lightness * (255 - color.blue)).round()
: (color.blue * lightness).round(),
);
// #Pangea
final pangeaMessageEvent = PangeaMessageEvent(

Loading…
Cancel
Save