Fix error badge size

This commit is contained in:
antonkomarev
2020-07-13 00:24:39 +03:00
parent 0b58381763
commit 893e4bfc4e
2 changed files with 4 additions and 4 deletions

View File

@@ -1,11 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="%IMAGE_WIDTH%" height="20">
<g shape-rendering="crispEdges">
<rect width="39" height="20" fill="#555"/>
<rect x="39" width="%MESSAGE_BACKGROUND_WIDTH%" height="20" fill="#e05d44"/>
<rect width="79" height="20" fill="#555"/>
<rect x="79" width="%MESSAGE_BACKGROUND_WIDTH%" height="20" fill="#e05d44"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif"
text-rendering="geometricPrecision" font-size="110">
<text x="205" y="140" transform="scale(.1)" textLength="290">%LABEL%</text>
<text x="405" y="140" transform="scale(.1)" textLength="690">%LABEL%</text>
<text x="%MESSAGE_TEXT_MARGIN_LEFT%" y="140" transform="scale(.1)" textLength="%MESSAGE_TEXT_LENGTH%">%MESSAGE%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 679 B

After

Width:  |  Height:  |  Size: 679 B

View File

@@ -42,7 +42,7 @@ final class ErrorImageRendererService
$minImageWidth = 98;
$minCounterBackgroundWidth = 17;
$minCounterTextLength = 70;
$minCounterTextMarginLeft = 480;
$minCounterTextMarginLeft = 885;
$label = 'Profile views';
$imageWidth = $minImageWidth + (8 * $messageLength);