Commit e1673f18 authored by Raghavendra Kamath's avatar Raghavendra Kamath 🎨 Committed by Nicolas Fella
Browse files

Adjust spacing between text and plotter line in Speed tab of nm applet

The text showing the speed of the download in the speed section of the plasma-nm applet was overlapping an sticking to the horizontal lines of the plotter.
the screen shot of the current spacing is as follows:

I increased the left margin of the graph and also added a line height to the text so that it appears centered with respect to the lines. I asked around the plasma IRC channel and according to @davidedmundson the lines don't correspond to the text, so in my opinion it is safe to make the lines and the text vertically centered to each other.

the screenshot after adding  the spacing is as follows :

Note: Currently I have only increased the left margin of the graph to accommodated the text assuming the text won't go beyond 4-5 digit and will get converted to MiB from KiB automatically. Ideally this should be dynamic and the graph should auto adjust according to the longest text + margin, So any suggestion for making it that way is welcome.

Reviewers: davidedmundson, #plasma, broulik, jgrulich, ngraham

Reviewed By: jgrulich, ngraham

Subscribers: ngraham, plasma-devel, davidedmundson

Tags: #plasma

Differential Revision:
parent e64b758c
......@@ -27,7 +27,7 @@ Item {
property QtObject dataEngine: null
property string deviceName
height: visible ? plotter.height + Math.round(units.gridUnit / 3) : 0
height: visible ? plotter.height + units.gridUnit : 0
Repeater {
model: 5
......@@ -40,6 +40,7 @@ Item {
height: paintedHeight
font.pointSize: theme.smallestFont.pointSize
lineHeight: 1.75
text: KCoreAddons.Format.formatByteSize((plotter.maxValue * 1024) * (1 - index / 5))
......@@ -51,10 +52,10 @@ Item {
readonly property int maxValue: Math.max(Math.max.apply(null, downloadPlotData.values), Math.max.apply(null, uploadPlotData.values))
anchors {
left: parent.left
leftMargin: units.iconSizes.medium
leftMargin: units.gridUnit * 3
right: parent.right
topMargin: Math.round(units.gridUnit / 2)
topMargin: units.gridUnit
width: units.gridUnit * 20
height: units.gridUnit * 8
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment