* set text size in avatar with custom size.

This commit is contained in:
Hao Sun
2021-09-08 15:38:03 +08:00
parent c4be0c2c26
commit 93126af4da
+1
View File
@@ -275,6 +275,7 @@ class html extends baseHTML
{
$colorHue = (html::stringToCode($user->account) * $hueDistance) % 360;
$style .= "background: hsl($colorHue, $saturation, $lightness);";
if($size) $style .= 'font-size: ' . round($size * 2 / 3) . 'px;';
}
if(!empty($style)) $style = "style='$style'";