mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-19 05:38:31 +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();
|
e = e.parent();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bg == null) {
|
if (!view && dark &&
|
||||||
|
color != null && (bg == null || bg == Color.TRANSPARENT)) {
|
||||||
// Special case:
|
// Special case:
|
||||||
// external draft / dark background / very dark/light font
|
// external draft / dark background / very dark/light font
|
||||||
if (color != null && !view && dark) {
|
double lum = ColorUtils.calculateLuminance(color);
|
||||||
double lum = ColorUtils.calculateLuminance(color);
|
if (lum < MIN_LUMINANCE_DARK || lum > 1 - MIN_LUMINANCE_DARK)
|
||||||
if (lum < MIN_LUMINANCE_DARK || lum > 1 - MIN_LUMINANCE_DARK)
|
color = null;
|
||||||
color = null;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
if (bg == null) {
|
||||||
if (color != null && view)
|
if (color != null && view)
|
||||||
color = adjustColor(dark, textColorPrimary, color);
|
color = adjustColor(dark, textColorPrimary, color);
|
||||||
} else if (bg == Color.TRANSPARENT) {
|
} else if (bg == Color.TRANSPARENT) {
|
||||||
|
|
Loading…
Reference in a new issue