diff --git a/applet/contents/ui/TrafficMonitor.qml b/applet/contents/ui/TrafficMonitor.qml --- a/applet/contents/ui/TrafficMonitor.qml +++ b/applet/contents/ui/TrafficMonitor.qml @@ -28,18 +28,19 @@ property real txBytes: 0 property alias interval: timer.interval - height: visible ? plotter.height + units.gridUnit : 0 + height: visible ? plotter.height + plotter.anchors.topMargin + units.smallSpacing : 0 Repeater { model: 5 PlasmaComponents.Label { anchors { left: parent.left top: parent.top - topMargin: Math.round(units.gridUnit / 3) + (index * plotter.height / 5) + topMargin: index * plotter.height / 5 } - height: paintedHeight + // Workaround to get paintedHeight. + height: theme.mSize(theme.smallestFont).height font.pointSize: theme.smallestFont.pointSize lineHeight: 1.75 text: KCoreAddons.Format.formatByteSize(plotter.maxValue * (1 - index / 5)) + i18n("/s") @@ -57,7 +58,7 @@ leftMargin: units.gridUnit * 3 right: parent.right top: parent.top - topMargin: units.gridUnit + topMargin: theme.mSize(theme.smallestFont).height / 2 } width: units.gridUnit * 20 height: units.gridUnit * 8