feat: tweak subject text position when icon presented

pull/6/head
Amio 2018-07-27 00:23:20 +08:00
rodzic d0c8c8a548
commit 6bbec38cde
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -20,8 +20,8 @@ module.exports = function ({subject, status, color, style, emoji, icon}) {
<rect x="${sbRectWidth}" width="${stRectWidth}" height="20" fill="#${color}"/>
</g>
<g fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="11">
<text x="${icon ? '23' : '6'}" y="14.8" fill="#000" opacity="0.1">${subject}</text>
<text x="${icon ? '22' : '5'}" y="13.8">${subject}</text>
<text x="${icon ? '23.2' : '6'}" y="14.8" fill="#000" opacity="0.1">${subject}</text>
<text x="${icon ? '22.2' : '5'}" y="13.8">${subject}</text>
<text x="${sbRectWidth + 5.5}" y="14.8" fill="#000" opacity="0.1" textLength="${stTextWidth}">${status}</text>
<text x="${sbRectWidth + 4.5}" y="13.8" textLength="${stTextWidth}">${status}</text>
</g>${icon ? genIconMarkup(icon) : ''}
@ -42,8 +42,8 @@ module.exports = function ({subject, status, color, style, emoji, icon}) {
<rect width="${width}" height="20" fill="url(#a)"/>
</g>
<g fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="11">
<text x="${icon ? '23' : '6.2'}" y="14.8" fill="#000" opacity="0.25">${subject}</text>
<text x="${icon ? '22' : '5.2'}" y="13.8">${subject}</text>
<text x="${icon ? '23.4' : '6.2'}" y="14.8" fill="#000" opacity="0.25">${subject}</text>
<text x="${icon ? '22.4' : '5.2'}" y="13.8">${subject}</text>
<text x="${sbRectWidth + 5.5}" y="14.8" fill="#000" opacity="0.25" textLength="${stTextWidth}">${status}</text>
<text x="${sbRectWidth + 4.5}" y="13.8" textLength="${stTextWidth}">${status}</text>
</g>${icon ? genIconMarkup(icon) : ''}