MessageIndicator: shorten thousands and millions
This commit is contained in:
parent
4a3320111f
commit
c9d5949847
|
@ -4,7 +4,11 @@ import QtQuick 2.12
|
||||||
import "../Base"
|
import "../Base"
|
||||||
|
|
||||||
HLabel {
|
HLabel {
|
||||||
text: unreads
|
text:
|
||||||
|
unreads >= 1000000 ? Math.floor(unreads / 1000000) + "M" :
|
||||||
|
unreads >= 1000 ? Math.floor(unreads / 1000) + "K" :
|
||||||
|
unreads
|
||||||
|
|
||||||
font.pixelSize: theme.fontSize.small
|
font.pixelSize: theme.fontSize.small
|
||||||
verticalAlignment: Qt.AlignVCenter
|
verticalAlignment: Qt.AlignVCenter
|
||||||
leftPadding: theme.spacing / 4
|
leftPadding: theme.spacing / 4
|
||||||
|
|
Loading…
Reference in New Issue
Block a user