fix: display name contrast in dark mode
This commit is contained in:
parent
a4dac91d39
commit
704ee5ef9c
2 changed files with 5 additions and 2 deletions
|
|
@ -165,7 +165,10 @@ class Message extends StatelessWidget {
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: displayname.color,
|
color: (Theme.of(context).brightness ==
|
||||||
|
Brightness.light
|
||||||
|
? displayname.color
|
||||||
|
: displayname.lightColor),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,6 @@ extension StringColor on String {
|
||||||
|
|
||||||
Color get lightColor {
|
Color get lightColor {
|
||||||
_colorCache[this] ??= {};
|
_colorCache[this] ??= {};
|
||||||
return _colorCache[this]![0.4] ??= _getColorLight(0.4);
|
return _colorCache[this]![0.7] ??= _getColorLight(0.7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue