1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-22 14:11:00 +00:00

Style helper: set initial selected color

This commit is contained in:
M66B 2021-07-15 14:28:34 +02:00
parent 6ec0494f39
commit 648f453553

View file

@ -274,6 +274,10 @@ public class StyleHelper {
} }
}); });
BackgroundColorSpan[] spans = edit.getSpans(start, end, BackgroundColorSpan.class);
if (spans != null && spans.length == 1)
builder.initialColor(spans[0].getBackgroundColor());
builder.build().show(); builder.build().show();
return true; return true;
@ -327,6 +331,10 @@ public class StyleHelper {
} }
}); });
ForegroundColorSpan[] spans = edit.getSpans(start, end, ForegroundColorSpan.class);
if (spans != null && spans.length == 1)
builder.initialColor(spans[0].getForegroundColor());
builder.build().show(); builder.build().show();
return true; return true;