From c9d5949847451584215d45dbf102d8ff2709cfee Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 19 May 2020 19:48:52 -0400 Subject: [PATCH] MessageIndicator: shorten thousands and millions --- src/gui/MainPane/MessageIndicator.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/MainPane/MessageIndicator.qml b/src/gui/MainPane/MessageIndicator.qml index 6e3b3b10..c496d883 100644 --- a/src/gui/MainPane/MessageIndicator.qml +++ b/src/gui/MainPane/MessageIndicator.qml @@ -4,7 +4,11 @@ import QtQuick 2.12 import "../Base" HLabel { - text: unreads + text: + unreads >= 1000000 ? Math.floor(unreads / 1000000) + "M" : + unreads >= 1000 ? Math.floor(unreads / 1000) + "K" : + unreads + font.pixelSize: theme.fontSize.small verticalAlignment: Qt.AlignVCenter leftPadding: theme.spacing / 4