From cd027ce844edbfd248e10cb5a5d5552ca1405366 Mon Sep 17 00:00:00 2001 From: Filip Fila Date: Thu, 1 Aug 2019 18:17:21 +0200 Subject: [PATCH] [applets/notifications] Try to not have the notification count numbers overflow the icon Summary: When the notification count is in double digits, the numbers can overflow the icons which is meant to contain them. This patch checks if there is more than 1 digit and then slightly reduces the size of the numbers. Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D22878 --- .../notifications/package/contents/ui/CompactRepresentation.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applets/notifications/package/contents/ui/CompactRepresentation.qml b/applets/notifications/package/contents/ui/CompactRepresentation.qml index 95a76e209..773cc0a38 100644 --- a/applets/notifications/package/contents/ui/CompactRepresentation.qml +++ b/applets/notifications/package/contents/ui/CompactRepresentation.qml @@ -94,7 +94,7 @@ MouseArea { PlasmaComponents.Label { id: countLabel anchors.centerIn: parent - width: Math.round(Math.min(parent.width, parent.height) * 0.75) + width: Math.round(Math.min(parent.width, parent.height) * (text.length > 1 ? 0.67 : 0.75)) height: width fontSizeMode: Text.Fit font.pointSize: 1024