feat: tweak icon right space when empty subject

pull/6/head
Amio 2018-07-28 18:17:37 +08:00
rodzic ab373bfdc0
commit 5cb3adc2d2
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -6,7 +6,7 @@ module.exports = function ({subject, status, color, style, emoji, icon, iconWidt
typeAssert(typeof status === 'string', '<status> must be string')
color = colorPresets[color] || color || colorPresets['blue']
const iconSpanWidth = icon ? (subject.length ? iconWidth + 4 : iconWidth - 1.5) : 0
const iconSpanWidth = icon ? (subject.length ? iconWidth + 4 : iconWidth - 2) : 0
const stTextWidth = calcWidth(status, emoji)
const sbRectWidth = calcWidth(subject, emoji) + 10 + iconSpanWidth
const stRectWidth = stTextWidth + 10