mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Fixed pasted white text on transparent background
This commit is contained in:
parent
cb509b3ab1
commit
26b0033929
1 changed files with 7 additions and 6 deletions
|
@ -644,15 +644,16 @@ public class HtmlHelper {
|
|||
e = e.parent();
|
||||
}
|
||||
|
||||
if (bg == null) {
|
||||
if (!view && dark &&
|
||||
color != null && (bg == null || bg == Color.TRANSPARENT)) {
|
||||
// Special case:
|
||||
// external draft / dark background / very dark/light font
|
||||
if (color != null && !view && dark) {
|
||||
double lum = ColorUtils.calculateLuminance(color);
|
||||
if (lum < MIN_LUMINANCE_DARK || lum > 1 - MIN_LUMINANCE_DARK)
|
||||
color = null;
|
||||
}
|
||||
double lum = ColorUtils.calculateLuminance(color);
|
||||
if (lum < MIN_LUMINANCE_DARK || lum > 1 - MIN_LUMINANCE_DARK)
|
||||
color = null;
|
||||
}
|
||||
|
||||
if (bg == null) {
|
||||
if (color != null && view)
|
||||
color = adjustColor(dark, textColorPrimary, color);
|
||||
} else if (bg == Color.TRANSPARENT) {
|
||||
|
|
Loading…
Reference in a new issue