1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-28 18:59:01 +00:00

Allow floating point font percentage

This commit is contained in:
M66B 2020-04-23 13:23:43 +02:00
parent 5067f4b1f5
commit 24ff190eef

View file

@ -1106,7 +1106,7 @@ public class HtmlHelper {
try {
if (value.endsWith("%"))
return Integer.parseInt(value.substring(0, value.length() - 1).trim()) / 100f * _current;
return Float.parseFloat(value.substring(0, value.length() - 1).trim()) / 100 * _current;
if (value.endsWith("em"))
return Float.parseFloat(value.substring(0, value.length() - 2).trim()) * _current;
if (value.endsWith("rem"))