[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
wilder-5.17
Filip Fila 7 years ago
parent e3035bbceb
commit cd027ce844
  1. 2
      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

Loading…
Cancel
Save